Duty Mod system - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Duty Mod system (
/showthread.php?tid=370969)
Duty Mod system -
ThePhenix - 21.08.2012
Well I have this code:
pawn Код:
dcmd_adminduty(playerid,params[])
{
#pragma unused params
if (AccInfo[playerid][Level] >= 2)
{
if(AccInfo[playerid][OnDuty] == 0)
{
AccInfo[playerid][OnDuty] = 1;
SetPlayerHealth(playerid,1000000);
GivePlayerWeapon(playerid,38,-500000);
SetPlayerColor(playerid, pink);
SetPlayerSkin(playerid, 217);
new string[128];
format(string,sizeof(string),"|- Administrator \"%s\" is now on Admin duty mode", pName(playerid));
return SendClientMessageToAll(blue, string);
}
else
{
AccInfo[playerid][OnDuty] = 0;
SetPlayerHealth(playerid,-0);
return SendClientMessage(playerid,orange,"You aren't on Admin duty mode");
}
}
return ErrorMessages(playerid, 5);
}
The first thing that I want is that the Admin won't be banned for the Anti-Cheat-System.
Because the minigun isn't allowed.
I want to do the minigun allowed for Admins On duty mode.
How I can do it?
Please tell me!
+rep!
Re: Duty Mod system -
=WoR=G4M3Ov3r - 21.08.2012
Mind telling me what anticheat are you using ?
Re: Duty Mod system -
ThePhenix - 21.08.2012
Forbbiden Weapons!
pawn Код:
forward WeaponCheck
public WeaponCheck(playerid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
new lbweapon[64];
new string[128];
new var;
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
var=GetPlayerWeapon(i);
if(IsForbiddenWeapon(var) && WeaponForbiddenForPlayer[i][var] && AccInfo[i][Level] == 0 && ServerInfo[ForbiddenWeaps] == 1)
{
SendClientMessage(i,lightred, "|- You have been Automatically Banned. | Reason: WeaponHack -| ");
GetWeaponName(var,lbweapon,sizeof(lbweapon));
format(lbweapon,sizeof(lbweapon),"Weapon Cheat (%s)",lbweapon);
BanEx(i,lbweapon);
format(string,sizeof(string),"|- Player %s (Id:%d) has been Automatically Banned. | Reason: Weapon Hack -|",PlayerName,i);
SendClientMessageToAll(lightred, string);
new str[128];
format(str,sizeof(str),"%s has been Automatically Banned. | Reason: WeaponHack",PlayerName);
SaveIn("BanLog",str);
}
}
return 1;
}
//========================
I'm using INI, I just want to know to to do it!