03.12.2011, 11:40
pawn Код:
// At The Top
#include <a_samp>
#include <zcmd>
#include <sscanf2>
CMD:giveadmin(playerid, params[])
{
new
id,
level;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You cannot use this command!");
if(sscanf(params, "ri", id, level)) return SendClientMessage(playerid, -1, "Usage: /giveadmin [id] [level]");
if(level > 10 || level < 0) return SendClientMessage(playerid, -1, "ERROR: You can use levels 0 to 10");
new
Sstring[128],
name2[MAX_PLAYER_NAME];
GetPlayerName(id, name2, sizeof(name2));
format(Sstring, sizeof(Sstring), "%s (On how it saved)", name2);
Your_Variable[id][enum of level] = level;
return 1;
}