15.02.2014, 01:20
So I have these different teams on my server.
So only S.W.A.T Officers can get S.W.A.T Weapons.
And only Firefighters Can get the tools they need.
But it seems to let all the team get any of these weapons
So the civilian can access /swat, /ff, /cop and /army
Would anyone know why this is happening?
If you need any more of the code let me know.
Thanks
Код:
CMD:swat(playerid, params[]) { if(GetPlayerTeam(playerid) != TEAM_SWAT) return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only S.W.A.T May Use This!"); GivePlayerWeapon(playerid, 3, 1); GivePlayerWeapon(playerid, 22, 1000); GivePlayerWeapon(playerid, 31, 2500); GivePlayerWeapon(playerid, 29, 1500); GivePlayerWeapon(playerid, 34, 100); GivePlayerWeapon(playerid, 17, 10); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Now Have S.W.A.T Weapons"); SetTimer("CanUseAgain",120000,1); return 1; } CMD:ff(playerid, params[]) { if(GetPlayerTeam(playerid) != TEAM_FIREFIGHTER) if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))//Change To The FF Weapons return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only Fire Fighters May Use This!"); GivePlayerWeapon(playerid, 42, 4500); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_RED, "You Now Have Fire Fighter Weapons"); SetTimer("CanUseAgain",120000,1); return 1; } CMD:army(playerid, params[]) { if(GetPlayerTeam(playerid) != TEAM_ARMY) if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))//Change To The ARMY Weapons return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only Army May Use This!"); GivePlayerWeapon(playerid, 3, 1); GivePlayerWeapon(playerid, 22, 1000); GivePlayerWeapon(playerid, 31, 2500); GivePlayerWeapon(playerid, 29, 1500); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_RED, "You Now Have Army Weapons"); SetTimer("CanUseAgain",120000,1); return 1; } CMD:cop(playerid, params[]) { if(GetPlayerTeam(playerid) != TEAM_CIA) if(GetPlayerTeam(playerid) != TEAM_COP) if(IsPlayerInRangeOfPoint(playerid, 7.0, 2695.6880, -1704.6300, 11.8438))//Change To The CoP Weapons return SendClientMessage(playerid, -1, "{FF0000}Error: {FFFFFF}Only Law Enforcement May Use This!"); GivePlayerWeapon(playerid, 3, 1); GivePlayerWeapon(playerid, 22, 1000); GivePlayerWeapon(playerid, 31, 2500); GivePlayerWeapon(playerid, 29, 1500); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, COLOR_RED, "You Now Have Law Enforcement Weapons"); SetTimer("CanUseAgain",120000,1); return 1; }
And only Firefighters Can get the tools they need.
But it seems to let all the team get any of these weapons
So the civilian can access /swat, /ff, /cop and /army
Would anyone know why this is happening?
If you need any more of the code let me know.
Thanks
![Smiley](images/smilies/smile.png)