30.11.2013, 22:16
Try this(untested.):
pawn Код:
CMD:setlevel(playerid, params[])
{
new giveid, level;
if(sscanf(params, "uii", giveid, level)) return SendClientMessage(playerid, COL_RED, "SYNTAX: /setlevel <name/id> <level>");
{
if(level < 5 || level > 0)
{
new name[24], level[128], level1[128],pname[24];
GetPlayerName(giveid, name, sizeof(name));
GetPlayerName(playerid, pname, sizeof(pname));
format(str, sizeof(str), "You have been set to level %d by %s", level, name);
PlayerInfo[giveid][pAdmin] = level;
SendClientMessage(giveid, COL_GREEN, level);
format(level, sizeof(level1), "You have successfully set %s to level %d", pname, level);
SendClientMessage(playerid, COL_GREEN, level1);
}
else return SendClientMessage(playerid, COL_RED, "Levels are between level 1 through 5!");
}
}