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(playeridparams[]) {
    if(
PlayerInfo[playerid][pAdmin] >= 6) {
        new 
name[32], strg[250], tmp[128], Indextmp strtok(paramsIndex);
        if(
sscanf(params"s"name)) return SendClientMessage(playeridred"USAGE: /rop [name]");
        new 
playerFile[100]; new player1 strval(tmp);
        
format(playerFile256"/ladmin/users/%s.ini"udb_encode(name));
        if(
fexist(playerFile))
           {
               
format(strsizeof(str), "%s account has been reseted by Administrator %s"pName(player1), pName(playerid));
            
SendClientMessageToAll(COLOR_GREYstrg);
            
aresetpall(player1);
            return 
CMDMessageToAdmins(playerid"ROP");
        } else return 
SendClientMessage(playeridred"ERROR: That player doesn't exist!");
    } else return 
SendClientMessage(playeridred"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(playeridparams[]) {
    if(
PlayerInfo[playerid][pAdmin] >= 6) {
        new 
name[32], strg[250], tmp[128], Indextmp strtok(paramsIndex);
        if(
sscanf(params"s[32]"name)) return SendClientMessage(playeridred"USAGE: /rop [name]");
        new 
playerFile[100]; new player1 strval(tmp);
        
format(playerFile256"/ladmin/users/%s.ini"udb_encode(name));
        if(
fexist(playerFile))
           {
               
format(strsizeof(str), "%s account has been reseted by Administrator %s"pName(player1), pName(playerid));
            
SendClientMessageToAll(COLOR_GREYstrg);
            
aresetpall(player1);
            return 
CMDMessageToAdmins(playerid"ROP");
        } else return 
SendClientMessage(playeridred"ERROR: That player doesn't exist!");
    } else return 
SendClientMessage(playeridred"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)