17.10.2012, 14:47
(
Last edited by RenovanZ; 22/11/2012 at 11:10 AM.
)
Removed
timer NOPCheck[5000, i](playerid)
{
if(GetPlayerState(playerid) != 2) NOPTrigger[playerid] = 0;
new newcar = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pAdmin] > 1 || GetPlayerState(playerid) != 2) return 1;
else if(IsAnDOCCar(newcar) && PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] != 11) ExecuteNOPAction(playerid);
else if(IsACopCar(newcar) && PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1) ExecuteNOPAction(playerid);
else if(IsAPlane(newcar) && (PlayerInfo[playerid][pFlyLic] != 1)) ExecuteNOPAction(playerid);
else if(IsAFBICar(newcar) && PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2) ExecuteNOPAction(playerid);
else if(IsAnNGCar(newcar) && PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] !=11) ExecuteNOPAction(playerid);
else if(IsAnNGAIRCar(newcar) && PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] !=11) ExecuteNOPAction(playerid);
else if(IsAnSFPDCar(newcar) && PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 3) ExecuteNOPAction(playerid);
else if(IsAnSASDCar(newcar) && PlayerInfo[playerid][pMember] != 7 && PlayerInfo[playerid][pLeader] != 7) ExecuteNOPAction(playerid);
else if(IsAPizzaCar(newcar) && PlayerInfo[playerid][pJob] != 21 && PlayerInfo[playerid][pJob2] != 21) ExecuteNOPAction(playerid);
else if(IsAnAmbulance(newcar) && PlayerInfo[playerid][pMember] != 4 && PlayerInfo[playerid][pLeader] != 4) ExecuteNOPAction(playerid);
else if(IsVIPcar(newcar) && PlayerInfo[playerid][pDonateRank] == 0) ExecuteNOPAction(playerid);
else if(IsATierraARCar(newcar) && PlayerInfo[playerid][pMember] != 12 && PlayerInfo[playerid][pLeader] != 12) ExecuteNOPAction(playerid);
else if(IsAnNGARMCar(newcar) && PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] !=11) ExecuteNOPAction(playerid);
return 1;
}
IsPlayerInRangeOfVehicle(playerid, vehicleid, Float: radius) {
new
Float:Floats[3];
GetVehiclePos(vehicleid, Floats[0], Floats[1], Floats[2]);
return IsPlayerInRangeOfPoint(playerid, radius, Floats[0], Floats[1], Floats[2]);
}