17.03.2012, 21:57
Ah now I got it
OnPlayerExitVehicle
I cannot make sure that works because im really tired, but atleast you get the idea
pawn Код:
new vehicle[MAX_VEHICLES];
pawn Код:
if (strcmp("/nrg", cmdtext, true, 10) == 0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
vehicle = CreateVehicle(522,X,Y,Z,0,-1,-1,-1),0);
PutPlayerInVehicle(playerid,vehicle(522,X,Y,Z,0,-1,-1,-1),0);
return 1;
}
pawn Код:
if(GetPlayerVehicleID == vehicle)
{
SetTimer("destroy", SETYOURTIMEHERE, false);
return 1;
}
pawn Код:
forward destroy()
public destroy()
{
DestroyVehicle(vehicle);
return 1;
}