Szerző Téma: Kocsi  (Megtekintve 945 alkalommal)

Kocsi
« Dátum: 2010. Április 14. - 14:06:40 »
0 Show voters
Csá all! 1. kérés  Milyen parancsal lehet egy ember mellé kocsit rakni?pl: rámegy az egyik menüpontra a dialogba és mellé rakjon  egy kocsit?
           2. kérés Azt meglehetne csinalni hogyha egy ember vesz egy kocsit akor az megmaradjon akor is ha kilép? Azon a helyen ahol hagyta
           3.  kérés Egyépként lehet olyan parancsot csinalni hogy bárki betudja zárni a kocsiját?xD

Kocsi
« Válasz #1 Dátum: 2010. Április 14. - 14:45:38 »
0 Show voters
Lehet, Lehet, Lehet

Kocsi
« Válasz #2 Dátum: 2010. Április 14. - 15:26:05 »
0 Show voters
Ezt az OnPlayetCommandText-hez :
 
   if (strcmp(\"/parancs\", cmdtext, true, 10) == 0)  // a parancs helyett azt írd oda amilyen parancsot szeretnél
{
new Float: X, Float: Y, Float: Z, Float: Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
         CreateVehicle(0,x+1,y,z,Ang,-1,-1,-1);  // 0 helyett a kívánt kocsi ID-je legyen ott
return 1;
}

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
Kocsi
« Válasz #3 Dátum: 2010. Április 14. - 15:45:14 »
0 Show voters

if(!strcmp(\"/NRG-MOTOR\", cmdtext, true)) return GivePlayerVehicle(playerid, 522);
 
stock GivePlayerVehicle(playerid, vehicleid)
{
if(!IsPlayerInAnyVehicle(playerid) && vehicleid > 399 && vehicleid < 612)
{
new Float:x, Float:y, Float:z, Float:a, vehicle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
vehicle = CreateVehicle(vehicleid, x, y, z, a, -1, -1, 50000);
PutPlayerInVehicle(playerid, vehicle, 0);
}
return 1;
}

Kocsi
« Válasz #4 Dátum: 2010. Április 14. - 18:49:15 »
0 Show voters
Error lett töle :C:\\Documents and Settings\\Felicián\\Asztal\\Untitled.pwn(401) : error 017: undefined symbol \"x\"
  ezek                    C:\\Documents and Settings\\Felicián\\Asztal\\Untitled.pwn(401) : error 017: undefined symbol \"x\"
igy raktam be a dialogba
 

if(dialogid == DIALOG_2)
    {
if(response == 1)
{
   switch(listitem)
   {
      case 0:
      {
           if(GetPlayerMoney(playerid) > 1000)
         {
                    GivePlayerMoney(playerid, -1000);
            SendClientMessage(playerid, 0x33AA33AA, \"Kaptál Egy hydrat-t!\" );
            new Float: X, Float: Y, Float: Z, Float: Ang;
            GetPlayerPos(playerid, X, Y, Z);
            GetPlayerFacingAngle(playerid, Ang);
                     CreateVehicle(520,x+1,y,z,Ang,-1,-1,-1);
         }
         else
         {
            SendClientMessage(playerid, 0xAA3333AA, \"Nincs rá elég pénzed!(1000$)\");
         }
      }
      case 1:
      {
          if(GetPlayerMoney(playerid) > 2000)
         {
                    
                    GivePlayerMoney(playerid, -2000);
            SendClientMessage(playerid, 0x33AA33AA, \"Kaptál 5 db Molotovot-t!\" );
            new Float: X, Float: Y, Float: Z, Float: Ang;
            GetPlayerPos(playerid, X, Y, Z);
            GetPlayerFacingAngle(playerid, Ang);
                     CreateVehicle(600,x+1,y,z,Ang,-1,-1,-1);
         }
               }
            }
         }
         else
         {
            SendClientMessage(playerid, 0xAA3333AA, \"Nincs rá elég pénzed!(1000$)\");
         }
         return 1;
         }
      return 0;
        }

Nem elérhető Csabesz

  • 7827
    • Profil megtekintése
Kocsi
« Válasz #5 Dátum: 2010. Április 14. - 20:56:41 »
0 Show voters
new Float: X, Float: Y, Float: Z, Float: Ang;

 
Helyett:
 
new Float: x, Float: y, Float: z, Float: Ang;

 
A pawn különbséget tud tenni kis és nagy betu között.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal