Question
#9

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{

    new string[256];
    new sendername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new vehicleid = GetPlayerVehicleID(playerid);

    if(newstate & (PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)) //tag mismatch
    {
        SeatBelt[playerid] = (IsModelABike(GetPlayerVehicleID(playerid))) ? (2) : (1);
        //SeatBelt[playerid] = ...        Bike (2), Other Vehicle (1). So if 'SeatBelt[playerid] == 2', it means they're wearing a helmet.
    }
    if((newstate & PLAYER_STATE_ONFOOT) && (oldstate & (PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER))) //tag mismatch
2x tagmismatch I commented lines
Reply


Messages In This Thread
Question - by Lajko1 - 03.08.2014, 10:16
Re: Question - by KayJ - 03.08.2014, 10:20
Re: Question - by McBan - 03.08.2014, 10:43
Re: Question - by Lajko1 - 03.08.2014, 10:47
Re: Question - by McBan - 03.08.2014, 11:00
Re: Question - by Threshold - 03.08.2014, 11:10
Re: Question - by Lajko1 - 03.08.2014, 12:35
Re: Question - by Threshold - 03.08.2014, 15:03
Re: Question - by Lajko1 - 03.08.2014, 15:35
Re: Question - by ViniBorn - 03.08.2014, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)