How to check if there is a driver in the car or not?
#1

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new playerState = GetPlayerState(killerid); // Get the killer's state
 
    if (playerState == PLAYER_STATE_PASSENGER ) // If the killer was in a vehicle,alright. What about and there were no drivers in it?
    {
// do the stuff.
    }
    return 1;
}
Read the if statement. How can I manage to do a thing like this?

So simply it will check if there is no players in the car of the killerid (a driver) if there is a driver it won't do anything.
Reply


Messages In This Thread
How to check if there is a driver in the car or not? - by Tamer - 23.02.2013, 20:29
Re: How to check if there is a driver in the car or not? - by Misiur - 23.02.2013, 20:34
Re: How to check if there is a driver in the car or not? - by Scenario - 23.02.2013, 20:37
Re: How to check if there is a driver in the car or not? - by Tamer - 24.02.2013, 06:35
Re: How to check if there is a driver in the car or not? - by Scenario - 24.02.2013, 06:47
Re: How to check if there is a driver in the car or not? - by Tamer - 24.02.2013, 06:51

Forum Jump:


Users browsing this thread: 1 Guest(s)