Destroy wrong vehicle
#8

Quote:
Originally Posted by haikalbintang
Посмотреть сообщение
Or change the SpawnVehicle[playerid] with this :

PHP код:
enum pInfo
{
 
pVehicle
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
public 
OnPlayerConnect(playerid)
{
   
PlayerInfo[playerid][pVehicle] = INVALID_VEHICLE_ID;
}
&
public 
OnPlayerDisconnect(playeridreason)
{
 
DestroyVehicle(PlayerInfo[playerid][pVehicle]);
 
PlayerInfo[playerid][pVehicle] = INVALID_VEHICLE_ID;
}
CreateXVehicle2(playeridmodelid)
{
    new 
Float:x,Float:y,Float:z,Float:angulo;
    
GetPlayerPos(playeridxyz);
    
GetPlayerFacingAngle(playeridangulo);
    if(
PlayerInfo[playerid][pVehicle] != INVALID_VEHICLE_IDDestroyVehicle(PlayerInfo[playerid][pVehicle]);
    
PlayerInfo[playerid][pVehicle] = CreateVehicle(modelid,x+0.5,y+3,z,angulo,-1,-1,9000);
    
printf("2. playerid:%d ----- SpawnedVehicle:%d -----",playerid,PlayerInfo[playerid][pVehicle]);
    return 
1;

Problem again happend.
Reply


Messages In This Thread
Destroy wrong vehicle - by MRM - 22.01.2017, 16:16
Re: Destroy wrong vehicle - by aymane123 - 22.01.2017, 16:32
Re: Destroy wrong vehicle - by MRM - 23.01.2017, 15:20
Re: Destroy wrong vehicle - by MRM - 31.01.2017, 17:02
Re: Destroy wrong vehicle - by haikalbintang - 31.01.2017, 17:10
Re: Destroy wrong vehicle - by MRM - 01.02.2017, 08:10
Re: Destroy wrong vehicle - by haikalbintang - 01.02.2017, 14:21
Re: Destroy wrong vehicle - by MRM - 03.06.2017, 15:58

Forum Jump:


Users browsing this thread: 1 Guest(s)