04.05.2016, 17:07
Hi, I got a problem with this code:
So as you can see it's supposed to spawn player immediately after death when the player is on foot and when player is in a vehicle then let him die normally. So the problem is that even if player is in a vehicle it spawns him immediately like he was on foot, but as you can see if player is in a vehicle it's supposed to do nothing. How to fix that?
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInAnyVehicle(playerid))
{
}
else
{
SpawnPlayer(playerid);
SetPlayerHealth(playerid, 100.0);
}


