Remove Warn
#1

Can help me to make an command to remove the warnings?
Reply
#2

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

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

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

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

I bet you're using GF script?
Reply
#7

No is Stunts
Reply
#8

Post the /warn command please.
Reply
#9

Код:
	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
Reply
#10

Quote:

It is copied in the gamemode GF

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


Forum Jump:


Users browsing this thread: 1 Guest(s)