OnPlayerEnterVehicle help
#1

can someone help me. im trying to make this script so when you enter vehicle id 408 and your in
Код:
 new gJob[MAX_PLAYERS]; // aka if(gJob[playerid] > 1)
that job you can enter that vehicle or if your not in that job you get rejected from that vehicle help please thanks.
Reply
#2

Something like this?

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == 408)
    {
        if(gJob[playerid] > 1)
        {
            //successfully start the job?
        }
        else
        {
            RemovePlayerFromVehicle(playerid);
            SendClientMessage(playerid, -1, "Your not in job to use that car");
        }
    }
    return 1;
}
And you have to add "gJob[playerid] = 0;" on "OnPlayerConnect" and "gJob[playerid] = 1;" in your job command.

I dont test it but i think will work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)