02.01.2014, 17:46
If you use sscanf, this is how it should be.
pawn Код:
CMD:setlevel(playerid,params[])
{
new userid, level;
if(sscanf(params, "ui", userid, level))
return SendClientMessage(playerid, -1, "/setlevel [playerid/partofname] [level]");
if(!IsPlayerConnected(userid))
return SendClientMessage(playerid, -1, "The user is offline.");
SetPlayerScore(userid, GetPlayerScore(userid)+level);
SendClientMessage(playerid, COLOR_RED, "The level has been set.");
return 1;
}