Save vehicle position
#1

Hello i am trying to code :
when player dies and the player is not in the safe zone then player vehicle position should be saved and respawned at the same place everytime until he changes the position manualy

here is my code

PHP код:

//onplayerdeath
    
if(!IsPlayerInDynamicArea(playeridsafezone))
    {
        new 
Float:xFloat:yFloat:zFloat:a;
        if(
PlayerInfo[playerid][pVehicle1] != 0)
        {
            
GetVehiclePos(car1[playerid], xyz);
            
GetVehicleZAngle(car1[playerid], a);
            
PlayerInfo[playerid][pVehicle1X] = x;
            
PlayerInfo[playerid][pVehicle1Y] = y;
            
PlayerInfo[playerid][pVehicle1Z] = z;
            
PlayerInfo[playerid][pVehicle1C] = a;
            
DestroyVehicle(car1[playerid]);
            
car1[playerid] = CreateVehicle(PlayerInfo[playerid][pVehicle1Model], Float:xFloat:yFloat:zFloat:aPlayerInfo[playerid][pVehicle1Color1], PlayerInfo[playerid][pVehicle1Color2], 999999);
        }
      } 
but its not working
Reply


Messages In This Thread
Save vehicle position - by SalmaN97 - 13.11.2015, 20:33
Re: Save vehicle position - by UltraScripter - 13.11.2015, 22:40
Re: Save vehicle position - by UltraScripter - 13.11.2015, 22:44

Forum Jump:


Users browsing this thread: 1 Guest(s)