Need Small help Rep +
#5

try it.

pawn Код:
new pVehicle[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        pVehicle[playerid] = GetPlayerVehicleID(playerid);
    }
    if(oldstate == PLAYER_STATE_DRIVER)
    {
        for(new id; id < MAX_PLAYERS; id++)
        {
            if(IsPlayerConnected(id) && GetPlayerVehicleID(id) == pVehicle[playerid])
            {
                RemovePlayerFromVehicle(id);
                SendClientMessage(id, 0xFF0000FF, "The driver is leaving the vehicle!");
            }
        }
        pVehicle[playerid] = INVALID_VEHICLE_ID;
    }
    return 1;
}
Reply


Messages In This Thread
Need Small help Rep + - by MBilal - 20.01.2015, 04:43
Re: Need Small help Rep + - by ChandraLouis - 20.01.2015, 04:48
Re: Need Small help Rep + - by Ryz - 20.01.2015, 04:49
Re: Need Small help Rep + - by MBilal - 20.01.2015, 04:51
Re: Need Small help Rep + - by xVIP3Rx - 20.01.2015, 04:51
Re: Need Small help Rep + - by MBilal - 20.01.2015, 05:02

Forum Jump:


Users browsing this thread: 1 Guest(s)