15.12.2014, 05:07
Quote:
|
Here you go man.
Код:
stock IsACopCar(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 523,427,528,596,598,597,599,601,497,430: return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(IsACopCar(vehicleid) && !ispassenger)
{
if(Groups[Player[playerid][Group]][CommandTypes] == 1)
{
SendClientMessage(playerid, -1, "You are not a cop!");
ClearAnimations(playerid);
}
}
}
|
Next I have a couple questions as I'm very new to pawno scripting.
1. Where do I put the stock IsACopCar(vehicleid) etc..?
2. How do I add the OnPlayerEnterVehicle... etc to my current one which is this:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if (GetPlayerSurfingVehicleID(playerid) == vehicleid)
{
ClearAnimations(playerid);
}
new model = GetVehicleModel(vehicleid);
if(model == 596)
{
Player[playerid][GotInCopCar]++;
ResetPlayerWeapons(playerid);
GivePlayerSavedWeapons(playerid);
}
return 1;
}


