SA-MP Forums Archive
little help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: little help (/showthread.php?tid=617275)



little help - Muhammad78 - 18.09.2016

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");




Re: little help - oMa37 - 18.09.2016

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");




Re: little help - Muhammad78 - 18.09.2016

ty for helping me, but the problem is now fixed