25.05.2014, 12:09
Hello, how can i make that i can remove score if the player is offline and that you cant give lower than 0 Score? Also not -1, -2 score blabla.
Код:
CMD:removexp(playerid,params[])
{
new targetid,givexp,string[256];
if(sscanf(params, "ui", targetid, givexp)) return SendClientMessage(playerid,-1,""chat" Usage: /removexp [playerid] [amount]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat""COL_RED" Player is not connected/online.");
pInfo[targetid][pXP] -= givexp;
format(string, sizeof(string), ""chat""COL_RED" %s %s (%d) has removed %s (%d) %d XP",GetAdminName(playerid),PlayerName(playerid),playerid,PlayerName(targetid),targetid,givexp);
SendClientMessageToAll(-1,string);
return 1;
}

