How to show this for the driver and the passenger ?
#8

https://sampwiki.blast.hk/wiki/OnPlayerStateChange

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate & PLAYER_STATE_PASSENGER)
    {
        new vid = GetPlayerVehicleID(playerid);
        if(IsAnTaxi(vid) || IsAnBus(vid))
        {
            foreach(new i : Player)
            {
                if(i == playerid) continue;
                if(!IsPlayerInVehicle(i, vid)) continue;
                if(GetPlayerVehicleSeat(i)) continue;
                new string[80];
                format(string, sizeof(string), "Passenger %s Entered the taxi with a fare of %d", GetPlayerNameEx(playerid), TransportValue[i]);
                SendClientMessage(i, -1, string);
                format(string, sizeof(string), "You have entered a taxi with a fare of $%d", TransportValue[i]);
                SendClientMessage(playerid, -1, string);
                break;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)