if (IsACopCar(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {} else { //WantedPoints[playerid]+=2; //SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); } }
if(IsACopCar(vehicleid))
{
if(OnDuty[playerid]==0)
{
RemovePlayerFromVehicle(playerid);
}
}
Originally Posted by Chivava
Yes but what if you're then on medic duty ? then you're able to use this vehicle.. I want it also to check that the player is pMember 1 / pLeader 1
and so on. |
if(IsACopCar(vehicleid))
{
if(OnDuty[playerid]==0)
{
RemovePlayerFromVehicle(playerid);
if(OnMDuty[playerid]==1)
{
}
}
}
if (IsACopCar(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3||PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pMember]==2||PlayerInfo[playerid][pMember]==3) {} else { if(PlayerInfo[playerid][pMedicDuty] == 0) { SendClientMessage(playerid, COLOR_GRAD3, "You are not on-duty as a medic!"); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); return 1; } //WantedPoints[playerid]+=2; //SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); } }
Originally Posted by Chivava
How do i make it so it checks if im in faction 1 and if im in faction it will go check if im on duty, if not then it kicks me off the vehicle... ?
|
if(PlayerInfo[playerid][pMember] != 1 || OnDuty[playerid] == 0)
{
RemovePlayerFromVehicle(playerid);
}
if (IsACopCar(vehicleid) && !ispassenger) { if(PlayerInfo[playerid][pMember] != 1 || OnDuty[playerid] == 0) { RemovePlayerFromVehicle(playerid); } SendClientMessage(playerid, COLOR_GRAD3, "You are not on duty as Police Officer"); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); return 1; } //WantedPoints[playerid]+=2; //SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); new Float:cx, Float:cy, Float:cz; GetPlayerPos(playerid, cx, cy, cz); SetPlayerPos(playerid, cx, cy, cz); } }
C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2172) : warning 219: local variable "cx" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2172) : warning 219: local variable "cy" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2172) : warning 219: local variable "cz" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2179) : warning 219: local variable "cx" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2179) : warning 219: local variable "cy" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2179) : warning 219: local variable "cz" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2183) : warning 209: function "OnPlayerEnterVehicle" should return a value C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2184) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2186) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2187) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2191) : error 021: symbol already defined: "GetPlayerPos" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2195) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2197) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2198) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2200) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2202) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2203) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2205) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2207) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2208) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2210) : error 021: symbol already defined: "cx" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2210) : error 021: symbol already defined: "cz" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(2216) : error 010: invalid function or declaration C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(21305) : warning 219: local variable "cx" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(21305) : warning 219: local variable "cy" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(21305) : warning 219: local variable "cz" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(21965) : warning 204: symbol is assigned a value that is never used: "item" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(22149) : warning 204: symbol is assigned a value that is never used: "item" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(43272) : warning 219: local variable "cx" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(43272) : warning 219: local variable "cy" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(43272) : warning 219: local variable "cz" shadows a variable at a preceding level C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(45221) : warning 203: symbol is never used: "cx" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(45221) : warning 203: symbol is never used: "cy" C:\Users\Simon\Desktop\GTA\GTARP\gamemodes\gtarp.pwn(45221) : warning 203: symbol is never used: "cz"