[fixed]error 017: undefined symbol "AdminLevel"
#1

enum PlayerInfo
{
Pass[129], //User's password
Adminlevel, //User's admin level
VIPlevel, //User's vip level
Money, //User's money
Scores, //User's scores
Kills, //User's kills
Deaths //User's deaths
}
new pInfo[MAX_PLAYERS][PlayerInfo];

Код:
CMD:setadmin(playerid, params[])
{
	if(pInfo[playerid][AdminLevel] == 5 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Server:Unknown Command");
 	new string[128], pplayerid, level;
 	if(sscanf(params, "ui", pplayerid,level)) return SendClientMessage(playerid, COLOR_RED, "Usage: /setadmin [Player ID/Player Name] [Admin Level]");
 	if(level > 5 || level <= 0) return SendClientMessage(playerid,COLOR_RED,"Max level is 5");
 	format(string,sizeof(string),""COL_RED"Admin "COL_WHITE"%s "COL_RED"has given you admin level"COL_WHITE" %d",GetNamee(playerid),level);
 	SendClientMessage(pplayerid,-1,string);
 	format(string,sizeof(string),""COL_RED"Player "COL_WHITE"%s "COL_RED"now have admin level"COL_WHITE" %d",GetNamee(pplayerid),level);
 	SendClientMessage(playerid,-1,string);
	pInfo[playerid][AdminLevel] = level;
	return 1;
}
Reply
#2

You declared it as "Adminlevel" not "AdminLevel"
Reply
#3

WOW.. I laughed so hard xD
+rep for that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)