18.09.2016, 16:25
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");
}