[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
#2

STOP POSTING THIS USELESS STUFF!!

CAN THIS CODE EVEN COMPILE?! SERIOUSLY...
Reply
#3

Quote:
Originally Posted by Superhot
View Post
STOP POSTING THIS USELESS STUFF!!

CAN THIS CODE EVEN COMPILE?! SERIOUSLY...
Obviously it cannot compile, you have to put it in your game mode.

its most certainly NOT useless!

good job fahad and keep it up !
Reply
#4

Quote:
Originally Posted by Superhot
View Post
STOP POSTING THIS USELESS STUFF!!

CAN THIS CODE EVEN COMPILE?! SERIOUSLY...
So u will add a filterscript with 1 cmd lol. This must be added in your gamemode. Who will add a single fs for removing warn
Reply
#5

suggestion:
make a define for arrays which should be edited and matched with the gamemode's arrays,for example:
Code:
pInfo[playerid][pAdminLevel]
to:
Code:
#define ADMIN(%0) the_array_itself[%0][pAdminLevel]
if(ADMIN(playerid) == 5235) {
Reply
#6

Quote:
Originally Posted by xkirill
View Post
suggestion:
make a define for arrays which should be edited and matched with the gamemode's arrays,for example:
Code:
pInfo[playerid][pAdminLevel]
to:
Code:
#define ADMIN(%0) the_array_itself[%0][pAdminLevel]
if(ADMIN(playerid) == 5235) {
Thx for suggestion. Was useful for my other 4 servers.
Reply
#7

you people just post ALOT of shit just for "+rep", idc is you rep attack me now because im saying the truth.
Reply
#8

How about I just spam the board by posting a command from my gamemode? Seriously, stop this.
Reply
#9

Quote:
Originally Posted by JimmyCh
View Post
How about I just spam the board by posting a command from my gamemode? Seriously, stop this.
did u mean i have copied your cmd ?
Reply
#10

you really made script and why are posting in here ? for a small CMd Its not a FS maybe u posted in wrong section

im really ROLF anyways idc if u made this i would give -REP cuz this aint even compile and this is not a filterscript

its just line

....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)