/setlevel prob
#1

My Code:

pawn Код:
CMD:setlevel(playerid, params[])
{
 new pID;
 if(pInfo[playerid][Adminlevel] >= 5)
 {
 if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
 {
     new amount;
     if (sscanf(params, "ud", pID,amount)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /setlevel [id] [amount]");
     INI_WriteInt(file,"AdminLevel",pInfo[pID][Adminlevel]);
  }
    return 1;
  }
    return 1;
}
Its not working... -.-
Reply
#2

PlayerInfo[pID][pAdmin] = amount;
Reply
#3

You're never setting the player's level actual variable to save.

add

pawn Код:
pInfo[pID][AdminLevel] = amount;
after the sscanf check.


EDIT: Ninja'd. Sorry.
Reply
#4

Quote:
Originally Posted by ScripteRMKD
Посмотреть сообщение
PlayerInfo[pID][pAdmin] = amount;
Thanks it works now +Rep for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)