little help
#1

ok i need help to fix my command below, function of the command is reseting a player's acc while the player is offline/ thankyou

PHP код:
CMD:rop(playerid, params[]) {
    if(
PlayerInfo[playerid][pAdmin] >= 6) {
        new 
name[32], strg[250], tmp[128], Index; tmp = strtok(params, Index);
        if(
sscanf(params, "s", name)) return SendClientMessage(playerid, red, "USAGE: /rop [name]");
        new 
playerFile[100]; new player1 = strval(tmp);
        
format(playerFile, 256, "/ladmin/users/%s.ini", udb_encode(name));
        if(
fexist(playerFile))
           {
               
format(str, sizeof(str), "%s account has been reseted by Administrator %s", pName(player1), pName(playerid));
            
SendClientMessageToAll(COLOR_GREY, strg);
            
aresetpall(player1);
            return 
CMDMessageToAdmins(playerid, "ROP");
        } else return 
SendClientMessage(playerid, red, "ERROR: That player doesn't exist!");
    } else return 
SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command");
} 
Reply
#2

Try, Also can you be more clear, And explain what is the exact issue?

PHP код:
CMD:rop(playerid, params[]) {
    if(
PlayerInfo[playerid][pAdmin] >= 6) {
        new 
name[32], strg[250], tmp[128], Index; tmp = strtok(params, Index);
        if(
sscanf(params, "s[32]", name)) return SendClientMessage(playerid, red, "USAGE: /rop [name]");
        new 
playerFile[100]; new player1 = strval(tmp);
        
format(playerFile, 256, "/ladmin/users/%s.ini", udb_encode(name));
        if(
fexist(playerFile))
           {
               
format(str, sizeof(str), "%s account has been reseted by Administrator %s", pName(player1), pName(playerid));
            
SendClientMessageToAll(COLOR_GREY, strg);
            
aresetpall(player1);
            return 
CMDMessageToAdmins(playerid, "ROP");
        } else return 
SendClientMessage(playerid, red, "ERROR: That player doesn't exist!");
    } else return 
SendClientMessage(playerid, red, "ERROR: You are not a high enough level to use this command");
} 
Reply
#3

ty for helping me, but the problem is now fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)