/warn Cmd
#1

I have a Problem with my /warn Command:

Код:
CMD:warn(playerid,params[])
{
	if(pInfo[playerid][pAdminLevel] >= 1 || IsPlayerAdmin(playerid))
	{
	    new targetid,reason[105],string[256];
	    if(sscanf(params, "us[105]", targetid, reason)) return SendClientMessage(playerid,-1,""chat" /warn [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 warned you\nReason: %s\nWarning Number: %i",GetAdminName(playerid),PlayerName(playerid), reason, pInfo[targetid][pWarnings]);
		ShowPlayerDialog(targetid,DIALOG_WARN,DIALOG_STYLE_MSGBOX,"Warning",string,"I Understand","");
		format(sentstring,sizeof(sentstring), ""chat""COL_LIGHTBLUE" %s %s has warned %s Reason: %s (%i / 3)",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason,pInfo[targetid][pWarnings]);
		SendClientMessageToAll(-1,sentstring);

		if(pInfo[targetid][pWarnings] >= 3)
		{
			format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has kicked %s [Reason: %s][3 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;
}
error 017: undefined symbol "pInfo"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)