Restricted Vehicles
#4

Hey, I have an example for you. This will 100% work for you but you'll have to adjust codes a bit

pawn Код:
new CopCar[1]; // one car for an example
// OnGameModeInit
CopCar[0] = AddStaticVehicleEx(428, 1544.2725830078, -1684.3175048828, 5.8806247711182, 90, 0, 1,300); //Securicar 1
// ============
forward IsACopCar(carid);
public IsACopCar(carid)
{
    for(new i = 0; i < sizeof(CopCar); i++)
    {
        if(carid == CopCar[i])  return 1;
    }
    return 0;
}

// Under OnplayerStateChange

if(IsACopCar(newcar))
        {
            if(PlayerInfo[playerid][pLeader] == 1||PlayerInfo[playerid][pMember] == 1) { } // adjust to yours
            else
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid, COLOR_GREY, "You're not in PD!");
            }
        }
Reply


Messages In This Thread
Restricted Vehicles - by Da_Noob - 25.01.2013, 08:32
Re: Restricted Vehicles - by Babul - 25.01.2013, 08:54
Re: Restricted Vehicles - by Da_Noob - 25.01.2013, 14:33
Re: Restricted Vehicles - by Sime30 - 25.01.2013, 14:44
Re: Restricted Vehicles - by Da_Noob - 25.01.2013, 14:52
Re: Restricted Vehicles - by Sime30 - 25.01.2013, 14:58
Re: Restricted Vehicles - by Da_Noob - 25.01.2013, 21:12
Re: Restricted Vehicles - by SchurmanCQC - 25.01.2013, 21:14

Forum Jump:


Users browsing this thread: 2 Guest(s)