Hello, this removes score offline but how to make that it works online too also both?
Код:
new tname[24],givexp,string[256],filestring[79];
if(sscanf(params, "s[24]i", tname, givexp)) return SendClientMessage(playerid,-1,""chat" Usage: /removexp [playername] [amount]");
if(givexp < 0) return SendClientMessage(playerid,-1,""chat""COL_RED" XP can't go below 0.");
format(filestring, sizeof(filestring), "/Users/%s.ini", tname);
if(!fexist(filestring)) return SendClientMessage(playerid,-1,""chat""COL_RED" That player name doesn't exist in the database!");
else
{
new INI:File = INI_Open(filestring);
INI_SetTag(File, "data");
INI_WriteInt(File, "pXP", givexp);
INI_Close(File);
format(string, sizeof(string), ""chat""COL_RED" %s %s (%d) has removed %s %d XP",GetAdminName(playerid),PlayerName(playerid),playerid,tname,givexp);
SendClientMessageToAll(-1,string);
return 1;