13.05.2011, 01:55
I have a kart deathmatch where you drive a kart and driveby on the top of four dragons casino. I'm trying to make it respawn the player who exits the vehicle and say you have been disqualified, but it is not working, here is the code:
Anyone know why?
pawn Код:
// under onplayerstatechange
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT)
{
if(GetPlayerVehicleID(playerid),571)
{
SpawnPlayer(playerid);
SendClientMessage(playerid, red, "You Have Been Disqualified From Kart DM. Reason: Vehicle Exited.");
GameTextForPlayer(playerid,"~p~disqualified ~n~~w~reason: ~b~exited vehicle",5000,3);
return 1;
}
}