Simple But Many Failed.
#2

Edit:
Код:
new Warned[MAX_PLAYERS];
#define MAX_WARN  3
save warned and load it when player loaggedin 
and make under OnPlayerSpawn or anywhere u r loading your saved data if(Warned[playerid] == 3) { SendMessage ... Your Account Was Blocked !" } 
CMD:warn(playerid,params[])
{
	new id,reason[64];
	if(sscanf(params,"us[64]",id,reason)) SendClientMessage(playerid,-1,"Usage: /warn [id] [reason]");
	else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,-1,"Player Not Found!");
	else
	{
	Warned[id]++;
	//Message....
        if(warn[id] == MAX_WARN)
	{
         Kick(id);
         }
	}
	return 1;
}
CMD:remwarn(playerid,params[])
{
	new id[64];
	if(sscanf(params,"u",id)) SendClientMessage(playerid,-1,"Usage: /remwarn [id] [reason]");
	else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid,-1,"Player Not Found!");
	else
	{
	Warned[id] --;
	Message ...
	}
	return 1;
}
and use Warned[playerid] in your /stats for displaying player warnings..
Reply


Messages In This Thread
Simple But Many Failed. - by Littlehelper - 11.02.2012, 11:39
Re: Simple But Many Failed. - by Sufyan - 11.02.2012, 11:46
Re: Simple But Many Failed. - by Littlehelper - 11.02.2012, 11:47
Re: Simple But Many Failed. - by [HK]Ryder[AN] - 11.02.2012, 11:47
Re: Simple But Many Failed. - by Littlehelper - 11.02.2012, 11:49
Re: Simple But Many Failed. - by Sufyan - 11.02.2012, 11:51
Re: Simple But Many Failed. - by Littlehelper - 11.02.2012, 11:52

Forum Jump:


Users browsing this thread: 1 Guest(s)