29.05.2013, 00:50
I've been posted a few threads lately, but that's because I'm very tired and need help. Help after all is how people extend their knowledge. I would like to know how I can make this /resetaccount command reset a targets account and not my own, thanks.
Plus, when I type it, it's not saving for some reason, I can just log back in with the same information as before.
Plus, when I type it, it's not saving for some reason, I can just log back in with the same information as before.
pawn Код:
CMD:resetaccount(playerid, params[])
{
if(PlayerInfo[playerid][pAdminLevel] >=5)
{
new string[200];
if(isnull(params)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /resetaccount [playername]");
SendClientMessage(playerid, COLOR_INFO, string);
new INI:File = INI_Open(UserPath(playerid));
INI_WriteInt(File,"Skin",0);
INI_WriteInt(File,"Password",0);
INI_WriteInt(File,"Money",0);
INI_WriteInt(File,"AdminLevel",0);
INI_WriteInt(File,"Developer",0);
INI_WriteInt(File,"Banned",0);
INI_Close(File);
Kick(playerid);
return 1;
}
else return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You are unauthorized to use this command.");
}