SA-MP Forums Archive
Remove Warn - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Remove Warn (/showthread.php?tid=107122)



Remove Warn - ()ZzY - 08.11.2009

Can help me to make an command to remove the warnings?



Re: Remove Warn - saiberfun - 08.11.2009

Quote:
Originally Posted by ()ZzY
Can help me to make an command to remove the warnings?
more infos please....


Re: Remove Warn - Karlip - 08.11.2009

Quote:
Originally Posted by ()ZzY
Can help me to make an command to remove the warnings?
What warnings?


Re: Remove Warn - Peter_Corneile - 08.11.2009

Quote:
Originally Posted by ()ZzY
Can help me to make an command to remove the warnings?
Which warnings ?


Re: Remove Warn - ()ZzY - 08.11.2009

When an admin give /warn there a command /disablewarn [ID / player] just to remove this warnings


Re: Remove Warn - Xander5270 - 08.11.2009

I bet you're using GF script?


Re: Remove Warn - ()ZzY - 08.11.2009

No is Stunts


Re: Remove Warn - acade - 08.11.2009

Post the /warn command please.


Re: Remove Warn - ()ZzY - 08.11.2009

Код:
	if(strcmp(cmd, "/warn", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	  	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /warn [playerid/PartOfName] [reason]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  if(IsPlayerConnected(giveplayerid))
			  {
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
					  GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[64];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /warn [playerid/PartOfName] [reason]");
							return 1;
						}
						PlayerInfo[giveplayerid][pWarns] += 1;
						if(PlayerInfo[giveplayerid][pWarns] >= 3)
						{
						  new year, month,day;
							getdate(year, month, day);
							format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
							BanLog(string);
							format(string, sizeof(string), "AdmCmd: %s was banned by %s (had 3 Warnings), reason: %s", giveplayer, sendername, (result));
							SendClientMessageToAll(COLOR_LIGHTRED, string);
							PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
							PlayerInfo[giveplayerid][pLevel] = -999;
							Ban(giveplayerid);
							return 1;
						}
						format(string, sizeof(string), "You warned %s, reason: %s", giveplayer, (result));
						SendClientMessage(playerid, COLOR_LIGHTRED, string);
						format(string, sizeof(string), "You were warned by %s, reason: %s", sendername, (result));
						SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
						return 1;
					}
				}//not connected
			}
			else
			{
				format(string, sizeof(string), "  %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
It is copied in the gamemode GF


Re: Remove Warn - mini-d - 08.11.2009

Quote:

It is copied in the gamemode GF

Well that sorts out the mystery of it not working in a "stuntz' gamemode.