How to
#5

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < 31; i++) //Loop.  It counts to 11
    { //Open Bracket
        if(vehicleid == LSPDVehicles[i]) //If the vehicleid is an LSPD vehicle
        { //Open Bracket
            if(PlayerInfo[playerid][Faction] != 1) //If the player is not in faction 1 (LSPD, in this case)
            { //Open Bracket
                ClearAnimations(playerid); //Clears their animation, preventing them from entering the vehicle.
                SendClientMessage(playerid, -1, "You don`t have the keys for this car."); //Sends a message to the player that he cannot enter it.
            } //Closed Bracket
        }
        if(vehicleid == LSFDVehicles[i])
        {
            if(PlayerInfo[playerid][Faction] != 2)
            {
                ClearAnimations(playerid);
                SendClientMessage(playerid, -1, "You don`t have the keys for this car.");
            }
        }
    } //Closed Bracket
    return 1; //Return a value
}
Reply


Messages In This Thread
How to - by semaj - 30.07.2013, 16:54
Re: How to - by Kutter - 30.07.2013, 17:10
Re: How to - by semaj - 30.07.2013, 22:37
Re: How to - by semaj - 31.07.2013, 08:37
Re: How to - by Facerafter - 31.07.2013, 08:47

Forum Jump:


Users browsing this thread: 1 Guest(s)