Szerző Téma: Ház,és Kocsi eladás,úgy hogy mások vehessék meg.  (Megtekintve 1277 alkalommal)

Ház,és Kocsi eladás,úgy hogy mások vehessék meg.
« Dátum: 2011. Október 11. - 20:22:00 »
0 Show voters
Sziasztok!
Ebben segítenétek?
Ezt a parancsot szeretném használni,de amikor beszállok a kocsiba,nem engedi eladni,nanem csak eltünteti :S:S
[pawn]
if(!strcmp(cmdtext, \"/aeladkocsi\", true))
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, \"Nem vagy bejelentkezve!\");
            return 1;
        }
        if(!IsAtDealership(playerid))
        {
            SendClientMessage(playerid, COLOR_GREY, \"Nem vagy az autókereskedésben!\");
            return 1;
        }
        if(Admin(playerid, 3))
        {
            new vehid = GetPlayerVehicleID(playerid);
            new Float:x,Float:y,Float:z;
               new Float:a;
               CarInfo[vehid][cOwned] = 0;
               strmid(CarInfo[vehid][cOwner], \"Dealership\", 0, strlen(\"Dealership\"), 999);
               PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
               SendClientMessage(playerid,COLOR_WHITE,\"Eladtad az autót!\");
               GetVehiclePos(vehid, x, y, z);
               GetVehicleZAngle(vehid, a);
               CarInfo[vehid][cLocationx] = x;
               CarInfo[vehid][cLocationy] = y;
               CarInfo[vehid][cLocationz] = z;
               CarInfo[vehid][cAngle] = a;
               RemovePlayerFromVehicle(playerid);
               TogglePlayerControllable(playerid, 1);
               engineOn[vehid] = false;
               format(stringx, sizeof(stringx), \"ELADÓ!\\nTípus: %s\\nÁr: %d$\\n(( Ha meg akarod venni, szállj be!\\n Ha nem hozza be a dialogot akkor /autóvesz! ))\",CarInfo[vehid][cDescription],CarInfo[vehid][cValue]);
         eladokocsi[vehid] = Create3DTextLabel(stringx,0xFFFF00AA,CarInfo[vehid][cLocationx], CarInfo[vehid][cLocationy], CarInfo[vehid][cLocationz],5,0,0);
                Attach3DTextLabelToVehicle( eladokocsi[vehid], vehid, 0.0, 0.0, 2.0);
          OnPropUpdate();
               DestroyVehicle(vehid);
         CreateVehicle(CarInfo[vehid][cModel],CarInfo[vehid][cLocationx],CarInfo[vehid][cLocationy],CarInfo[vehid][cLocationz]+1.0,CarInfo[vehid][cAngle],CarInfo[vehid][cColorOne],CarInfo[vehid][cColorTwo],60000);
            return 1;
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, \"Nem vagy fõadmin!\");
            return 1;
        }
    }
    return 1;
}
[/pawn]
Nem értem...
Válaszotokat elõre is köszönöm.
2. kérdés....
[pawn]
if(strcmp(cmd, \"/aeladház\", true) == 0 || strcmp(cmd, \"/aeladhaz\", true) == 0)
{
    if(IsPlayerConnected(playerid))
   {
      GetPlayerName(playerid, playername, sizeof(playername));
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
         SendClientMessage(playerid, COLOR_GRAD1, \"HASZNÁLAT: /aeladház [házid]\");
         return 1;
      }
      new house = strval(tmp);
      if (Admin(playerid, 3))
      {
         HouseInfo[house][hHel] = 0;
         HouseInfo[house][hArm] = 0;
         HouseInfo[house][hHealthx] = 0;
         HouseInfo[house][hHealthy] = 0;
         HouseInfo[house][hHealthz] = 0;
         HouseInfo[house][hArmourx] = 0;
         HouseInfo[house][hArmoury] = 0;
         HouseInfo[house][hArmourz] = 0;
         HouseInfo[house][hLock] = 1;
         HouseInfo[house][hOwned] = 0;
         HouseInfo[house][hVec] = 418;
         HouseInfo[house][hVcol1] = -1;
         HouseInfo[house][hVcol2] = -1;
         strmid(HouseInfo[house][hOwner], \"The State\", 0, strlen(\"The State\"), 255);
         PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
         SendClientMessage(playerid,COLOR_WHITE,\"Eladtad a házat!\");
         format(stringx, sizeof(stringx), \"Ez a ház eladó!\\n Ára %d$\\n (( /házvesz ))\",HouseInfo[house][hValue]);
         hazelado = Create3DTextLabel(stringx,0xFFFF00AA,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez],25,0,1);
         //format(string1, sizeof(string), \"[Eladó]\\n$ %d\",HouseInfo[house][hValue]);
         //hazelado = Create3DTextLabel(string1,0x006400FF,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey], HouseInfo[house][hEntrancez]+1,15,0,1);
         OnPropUpdate();
         return 1;
      }
      else
      {
         SendClientMessage(playerid, COLOR_WHITE, \"Nem vagy 2-es admin!\");
      }
   }
   return 1;
}
[/pawn]
Válaszotokat elõre is köszönöm,mind2 kérdésnél.Sziasztok!
« Utoljára szerkesztve: 2011. Október 11. - 20:30:02 írta davidszasza99 »

Ház,és Kocsi eladás,úgy hogy mások vehessék meg.
« Válasz #1 Dátum: 2011. Október 12. - 12:50:41 »
+1 Show voters
kedves davidszasza99
ezt a DT-böl vettem ki, és mûködõképes, remélem nálad is menni fog
[pawn]if(strcmp(cmd, \"/eladautó\", true) == 0 || strcmp(cmd, \"/eladauto\", true) == 0)
{
    tmp = strtok(cmdtext, idx);
    new kocsikulcs = PlayerInfo[playerid][pPcarkey];
    new kocsikulcs2 = PlayerInfo[giveplayerid][pPcarkey];
    if(!strlen(tmp))
    {
        SendClientMessage(playerid,COLOR_GRAD2,\"HASZNÁLAT: /eladautó [JátékosID/NévRészlet]\");
      return 1;
   }
   giveplayerid = ReturnUser(tmp);
   if(IsPlayerConnected(giveplayerid))
   {
       if(GetDistanceBetweenPlayers(playerid,giveplayerid) < 5)
       {
           if(kocsikulcs != 999)
           {
              if(kocsikulcs2 == 999)
              {
                  new nev[32];
               GetPlayerName(playerid, nev, sizeof(nev));
               GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
               PlayerInfo[giveplayerid][pPcarkey] = kocsikulcs;
               strmid(CarInfo[kocsikulcs][cOwner], giveplayer, 0, strlen(giveplayer), 999);
               PlayerInfo[playerid][pPcarkey] = 999;
                        DateProp(playerid);
               OnPropUpdate();
               OnPlayerUpdate(playerid);
               format(stringx,sizeof(stringx),\"Odaadtad %s a kulcsokat!\", rag(giveplayer,2));
               SendClientMessage(playerid,COLOR_LIGHTBLUE,stringx);
               format(stringx,sizeof(stringx),\"%s átadta a kocsija kulcsait. Most már a tiéd a kocsi.\", nev);
               SendClientMessage(giveplayerid,COLOR_LIGHTBLUE,stringx);
               new h,mi,s,y,m,d;
               getdate(y,m,d);
               gettime(h,mi,s);
               format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] %s eladta a kocsiját %s.\",y,m,d,h,mi,s,nev,rag(giveplayer,3));
               LoOoG(stringx);
            }
            else SendClientMessage(giveplayerid,COLOR_GRAD2, \"Már van egy autód! Elõször add el!\");
         }
         else SendClientMessage(playerid,COLOR_GRAD2, \"Nincs kocsid amit eladhatnál!\");
      }
      else SendClientMessage(playerid,COLOR_GRAD2, \"Túl messze vagy az illetõtõl!\");
   }
   else SendClientMessage(playerid,COLOR_GRAD2, \"A játékos nem elérhetõ!\");
    return 1;
}[/pawn]

Nem elérhető scripter01

  • 1035
  • Ex Moderálisan Globális
    • Profil megtekintése
Ház,és Kocsi eladás,úgy hogy mások vehessék meg.
« Válasz #2 Dátum: 2011. Október 13. - 11:15:24 »
0 Show voters
õõ is a dtrpg modból vete ki amúgy de amint írtak az jó lenne kedves davidszasza99

Nem elérhető JackBronson

  • 1499
  • ??
    • Profil megtekintése
Ház,és Kocsi eladás,úgy hogy mások vehessék meg.
« Válasz #3 Dátum: 2011. Október 13. - 11:24:17 »
0 Show voters
midenkinek komolyan mondom ez a problémája.
Mindenki a sz*r DTRPG -t használja.
Erre tudod mi a lehetõség ,hogy kijavitsad /q...

Nem elérhető scripter01

  • 1035
  • Ex Moderálisan Globális
    • Profil megtekintése
Ház,és Kocsi eladás,úgy hogy mások vehessék meg.
« Válasz #4 Dátum: 2011. Október 13. - 11:28:23 »
0 Show voters
JaCk ügye hogy már mindenki a fos DTRPG modot hazsnálja jó igaz én is abba kérek segítséget de nem magamnak kell a mod én is a havernak próbálok segíteni de én a DTRPG moddal soha nem foglalkoznák!

Ház,és Kocsi eladás,úgy hogy mások vehessék meg.
« Válasz #5 Dátum: 2011. Október 13. - 14:57:53 »
0 Show voters
Köszönök mindenkinek mindent...
És amúgy JaCk,nem nagyon érdekel a véleményed hogy miért azzal a \"sz*r\" DTRPG mód,mert amúgy képzeld el hogy már a 3. város megvan,és nincs már bugg,mindent kijavítottunk....

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal