Help with setlevel (admin)
#8

Код:
CMD:setlevel(playerid, params[])
{
	new level, id;
	if(sscanf(params, "rd", id, level)) return SendClientMessage(playerid, RED, "[USAGE]: /setlevel [name/id] [level]");
	if(!IsPlayerConnected(id) ) return SendClientMessage(playerid, RED, "Player not found.");
    if(IsLoggedIn{id} == 0) return SendClientMessage(playerid, RED, "Player not logged in.");
    if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][aLevel] == 4)
	{
	    PlayerInfo[id][aLevel] = level;
	    PlayerPlaySound(id,1085,0.0,0.0,0.0);
	    format(fstr, sizeof(fstr), "You have set %s [%d] admin level to %d.", GetName(id), id, level);
	    SendClientMessage(playerid, YELLOW, fstr);
	    format(fstr, sizeof(fstr), "Admin %s [%d] has set your admin level to %d.", GetName(playerid), playerid, level);
	    SendClientMessage(id, LIGHTGREEN, fstr);
	    SaveUserStats(id);
    }
    else
    {
        SendClientMessage(playerid, RED, "Only admin level 4 can use this command.");
    }
	return true;
}
you use if(IsLoggedIn{id} == 0) '{}' what is this? enum?
Reply


Messages In This Thread
Help with setlevel (admin) - by Charalambos26 - 24.05.2015, 14:09
Re: Help with setlevel (admin) - by Konstantinos - 24.05.2015, 14:22
Re: Help with setlevel (admin) - by Charalambos26 - 24.05.2015, 14:28
Re: Help with setlevel (admin) - by Konstantinos - 24.05.2015, 14:37
Re: Help with setlevel (admin) - by Charalambos26 - 24.05.2015, 14:50
Re: Help with setlevel (admin) - by Charalambos26 - 24.05.2015, 14:56
Re: Help with setlevel (admin) - by Konstantinos - 24.05.2015, 15:04
Re: Help with setlevel (admin) - by FplayerGR - 24.05.2015, 15:05
Re: Help with setlevel (admin) - by Charalambos26 - 24.05.2015, 15:11

Forum Jump:


Users browsing this thread: 3 Guest(s)