Posts: 368
Threads: 24
Joined: Feb 2012
If you are using sscanf, you can simply do it like this;
pawn Код:
CMD:setadmin(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are not admin!");
new id, lvl, str[128];
if(sscanf(params, "ud", id, lvl)) return SendClientMessage(playerid, -1, "Usage: /setadmin [Name/id] [Level]");
PlayerInfo[id][pAdmin] = lvl; // Set the admin lvl of the chosen player
format(str, sizeof(str), "You have set %s's admin LVL to %d", pName(id), lvl); // replace pName with whatever function you use for getting name
SendClientMessage(playerid, -1, str);
return 1;
}
Posts: 267
Threads: 58
Joined: Feb 2013
Reputation:
0
Not trying not to sound mean but that doesn't explain my problem.
Posts: 368
Threads: 24
Joined: Feb 2012
I dont see whats wrong eigther, but you asked about setadmin cmd......
Which line is in the code is the error in?
Posts: 268
Threads: 4
Joined: Jun 2012
Reputation:
0
show us the Define (macro) of ''COL_RED''
Posts: 568
Threads: 28
Joined: Dec 2012
Reputation:
0
#define COL_RED 0xF81414AA
and you are done.
Posts: 267
Threads: 58
Joined: Feb 2013
Reputation:
0
Thanks I have found out that the color codes for dialogs are different