25.01.2013, 14:44
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!");
}
}