This hard this time
#1

Hello guys i have made this command i got no error but when i go in the game to try it its not kick me on 3/3 warnings its stay warn forever i dont get any kick so help! please


Код:
dcmd_warn(playerid, params[])
{
	new warnID, Reason[128];
	if(Player[playerid][admin] < 1) return 0;
	if (sscanf(params,"us",warnID, Reason)) return SendClientMessage(playerid, COLOR_GREY, "|| Usage: /warn [playerid] [reason] ||");
	if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
	new wString1[128],wString2[128],wString3[128],wString4[128],wString5[128],wString6[128],wString7[128],wString8[128],Name[MAX_PLAYER_NAME],aname[MAX_PLAYER_NAME];
	
	new warnings =0;
	warnings +=1;
	if(warnings <=2) {
	GetPlayerName(warnID,Name,sizeof(Name));
	GetPlayerName(playerid,aname,sizeof(aname));
	format(wString1,sizeof(wString1), "**(ADMIN WARN)** %s(%d) %s",Name, warnID, Reason);
	SendClientMessageToAll(gold, wString1);
	format(wString2,sizeof(wString2), "You Have WARN %s(%d) For Reason: %s",Name, warnID,Reason);
	SendClientMessage(playerid,COLOR_GREEN, wString2);
	format(wString3,sizeof(wString3), "You Have Been WARNED By Admin For Reason: %s",Reason);
	SendClientMessage(warnID, f, wString3);
	format(wString4,sizeof(wString4), "Admin %s(%d) Has WARN %s(%d) For Reason: %s",aname,playerid,Name,warnID,Reason);
	SendAdminMessage(gold, wString4);
	SaveToFile("Warns", wString4);
 	}
	else if(warnings ==3)
 	{
	format(wString5,sizeof(wString5), "**(AUTO KICK)** %s(%d) %s",Name, warnID, Reason);
	SendClientMessageToAll(gold, wString5);
	format(wString6,sizeof(wString6), "You Have KICK %s(%d) For Reason: %s",Name, warnID,Reason);
	SendClientMessage(playerid,COLOR_GREEN, wString6);
	format(wString7,sizeof(wString7), "You Have Been AUTO KICK By Server For Reason: %s",Reason);
	SendClientMessage(warnID, f, wString7);
	format(wString8,sizeof(wString8), "Admin %s(%d) Has KICK %s(%d) For Reason: %s",aname,playerid,Name,warnID,Reason);
	SendAdminMessage(gold, wString8);
	SaveToFile("Auto KICKS", wString8);
	Kick(warnID);
	}
	return 1;
}
Reply


Messages In This Thread
This hard this time - by [MKD]Max - 31.01.2011, 13:22
Re: This hard this time - by bartje01 - 31.01.2011, 13:24
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:29
Re: This hard this time - by bartje01 - 31.01.2011, 13:31
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:32
Re: This hard this time - by bartje01 - 31.01.2011, 13:32
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:34
Re: This hard this time - by bartje01 - 31.01.2011, 13:44
Re: This hard this time - by [MKD]Max - 31.01.2011, 13:50
Re: This hard this time - by Jefff - 31.01.2011, 13:59

Forum Jump:


Users browsing this thread: 1 Guest(s)