25.01.2013, 17:10
Here, this one is when he tries to enter to block him entering...
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 OnPlayerEnterVehicle
if (IsACopCar(vehicleid) && !ispassenger)
{
if(PlayerInfo[playerid][pLeader]==1 || PlayerInfo[playerid][pMember]==1) {}
else
{
SendClientMessage(playerid, COLOR_GREY, "You're not in PD!");
new Float:cx, Float:cy, Float:cz;
GetPlayerPos(playerid, cx, cy, cz);
SetPlayerPos(playerid, cx, cy, cz);
}
}