24.01.2018, 10:01
So I have my setlevel command but how do I check if a player is already admin?
thats half of the code
edit: i mean same level*
thats half of the code
Код:
CMD:setlevel(playerid, params[])
{
if(pInfo[playerid][Admin] < 3) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) You don't have the priviliges to use this command.");
else
{
new msg1[150], msg2[150], target, level,name[MAX_PLAYER_NAME];
if(target == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) The player you are trying to set admin to is offline!");
if(sscanf(params, "ud", target, level)) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) /setlevel [ID] [LEVEL].");
else if(level > 3) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) The admin levels are only between 0-3.");
else if(level < 0) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) The admin levels are only between 0-3.");
else
{


