[FilterScript] Remove warn cmd. For ZA !!
#1


Hey Guys !

I have created remove warn cmd for zombie apocalypse server. It works almost in all the version of Zombie Apocalypse series!

It works like this when any admin will type cmd /rwarn (playerid) (reason). Than it will remove a warning of the player.

Script.

Code:
CMD:rwarn(playerid,params[])
{
	if(pInfo[playerid][pAdminLevel] >= 4 || IsPlayerAdmin(playerid))
	{
	    new targetid,reason[105],string[256];
	    if(sscanf(params, "us[105]", targetid, reason)) return SendClientMessage(playerid,-1,""chat" /rwarn [playerid] [reason]");
	    if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");

		new sentstring[128];

        pInfo[targetid][pWarnings]--;

	    format(string,sizeof(string), "%s %s has removed your warning\nReason: %s\nRemoved Warning Number: %i",GetAdminName(playerid),PlayerName(playerid), reason, pInfo[targetid][pWarnings]);
		ShowPlayerDialog(targetid,DIALOG_WARN,DIALOG_STYLE_MSGBOX,"Good News",string,"Ok, Dude","");
		format(sentstring,sizeof(sentstring), ""chat""COL_LIGHTBLUE" %s %s has removed warning of %s Reason: %s (%i / 3)",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason,pInfo[targetid][pWarnings]);
		SendClientMessageToAll(-1,sentstring);

		if(pInfo[targetid][pWarnings] >= 100)
		{
			format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has kicked %s [Reason: %s][100 Warnings EXCEEDED]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
			SendClientMessageToAll(-1,string);
			Kick(targetid);
		}
	}
	else {
		SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
	}
	return 1;
}

NOTE: MUST BE ADDED IN YOUR GM. DONT KNOW HOW? SEND ME PM/COMMENT DOWN
Reply


Messages In This Thread
Remove warn cmd. For ZA !! - by FahadKing07 - 06.10.2013, 11:18
Re: Remove warn cmd. For ZA !! - by Superhot - 06.10.2013, 12:10
Re: Remove warn cmd. For ZA !! - by Voxel - 06.10.2013, 13:26
Re: Remove warn cmd. For ZA !! - by FahadKing07 - 06.10.2013, 13:48
Re: Remove warn cmd. For ZA !! - by xkirill - 06.10.2013, 14:02
Re: Remove warn cmd. For ZA !! - by FahadKing07 - 06.10.2013, 14:06
Re: Remove warn cmd. For ZA !! - by xF4Life - 06.10.2013, 15:21
Re: Remove warn cmd. For ZA !! - by JimmyCh - 06.10.2013, 18:02
Re: Remove warn cmd. For ZA !! - by FahadKing07 - 06.10.2013, 18:17
Re: Remove warn cmd. For ZA !! - by xXxFerZExXx - 08.10.2013, 05:37

Forum Jump:


Users browsing this thread: 2 Guest(s)