18.06.2011, 22:21
Hello all, i have this code:
And i have:
But i want, when he exits the vehicle, the car mustn't spawn again. It must despawn/go away completely. But it just re-spawns when he exits.
PHP код:
new veh;
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are already in a vehicle, leave your car to spawn a new one.");
}
else
veh = CreateVehicle(415, 2135.12, -2552.65, 13.55, 90, 0, 0, 100000000000000000000000000);
PutPlayerInVehicle(playerid,veh,0);
SetCameraBehindPlayer(playerid);
PHP код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
new vehicleid2 = GetPlayerVehicleID(playerid);
DestroyVehicle(vehicleid2);
return 1;
}