21.07.2011, 04:00
(
Последний раз редактировалось Donya; 21.07.2011 в 05:01.
)
pawn Код:
new lastvehicle[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
lastvehicle[playerid] = -1;
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger) lastvehicle[playerid] = vehicleid;
}
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(newstate == 2)
{
if(lastvehicle[playerid] != GetPlayerVehicleID(playerid))
{
//Different vehicle. do code here
}
}
return 1;
}