faction vehicles
#1

I have this script that allows only faction 1 members enter faction 1 vehicles.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < 12; i++) //Loop.  It counts to 11
    { //Open Bracket
        if(vehicleid == LSPDVehicles[i]) //If the vehicleid is an LSPD vehicle
        { //Open Bracket
            if(pData[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
        } //Closed Bracket
    } //Closed Bracket
    return 1; //Return a value
}
how to make that faction 2 memebers, can only enter faction 2 vehicles?
Reply


Messages In This Thread
faction vehicles - by fonetic - 24.11.2013, 13:38
Re: faction vehicles - by Krakuski - 24.11.2013, 13:58
Re: faction vehicles - by fonetic - 24.11.2013, 14:11
Re: faction vehicles - by Zues - 24.11.2013, 14:19
Re: faction vehicles - by fonetic - 24.11.2013, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)