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(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");
}
Re: little help -
oMa37 - 18.09.2016
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");
}
Re: little help -
Muhammad78 - 18.09.2016
ty for helping me, but the problem is now fixed