[ajuda]Respawn no carro antigo
#3

pawn Код:
new Carro[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(!strcmp("/zr350", cmdtext, true))
     {
          if(Carro[playerid] != 0 || IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "Vocк jб tem um carro!");
          new Float:X, Float:Y, Float:Z, Float:Angle;
          GetPlayerPos(playerid, X, Y, Z);
          GetPlayerFacingAngle(playerid, Angle);
          Carro[playerid] = CreateVehicle(477, X, Y, Z, Angle, -1, -1, 1800000);
          PutPlayerInVehicle(playerid, Carro[playerid], 0);
          return 1;
     }
     return 0;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
     if(oldstate == 2)
     {
          if(Carro[playerid] != 0)
          {
               DestroyVehicle(Carro[playerid]);
               Carro[playerid] = 0;
          }
     }
     return 1;
}
Reply


Messages In This Thread
[ajuda]Respawn no carro antigo - by Andrew_Guiga - 21.06.2011, 15:17
Re: [ajuda]Respawn no carro antigo - by Shadoww5 - 21.06.2011, 15:23
Re: [ajuda]Respawn no carro antigo - by Dr_Pawno - 21.06.2011, 15:28
Re: [ajuda]Respawn no carro antigo - by Andrew_Guiga - 21.06.2011, 15:38
Re: [ajuda]Respawn no carro antigo - by Ricop522 - 21.06.2011, 15:47
Re: [ajuda]Respawn no carro antigo - by Shadoww5 - 21.06.2011, 16:05

Forum Jump:


Users browsing this thread: 1 Guest(s)