Remove warn cmd. For ZA !! -
FahadKing07 - 06.10.2013
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
Re: Remove warn cmd. For ZA !! -
Superhot - 06.10.2013
STOP POSTING THIS USELESS STUFF!!
CAN THIS CODE EVEN COMPILE?! SERIOUSLY...
Re: Remove warn cmd. For ZA !! -
Voxel - 06.10.2013
Quote:
Originally Posted by Superhot
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

!
Re: Remove warn cmd. For ZA !! -
FahadKing07 - 06.10.2013
Quote:
Originally Posted by Superhot
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
Re: Remove warn cmd. For ZA !! -
Kaperstone - 06.10.2013
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) {
Re: Remove warn cmd. For ZA !! -
FahadKing07 - 06.10.2013
Quote:
Originally Posted by xkirill
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.
Re: Remove warn cmd. For ZA !! -
xF4Life - 06.10.2013
you people just post ALOT of shit just for "+rep", idc is you rep attack me now because im saying the truth.
Re: Remove warn cmd. For ZA !! -
JimmyCh - 06.10.2013
How about I just spam the board by posting a command from my gamemode? Seriously, stop this.
Re: Remove warn cmd. For ZA !! -
FahadKing07 - 06.10.2013
Quote:
Originally Posted by JimmyCh
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 ?
Re: Remove warn cmd. For ZA !! -
xXxFerZExXx - 08.10.2013
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
....