New Command help
#2

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;
}
Reply


Messages In This Thread
New Command help - by HarrySidwell - 03.12.2011, 11:29
Re: New Command help - by Kostas' - 03.12.2011, 11:40
Re: New Command help - by Mr.Fames - 03.12.2011, 13:22

Forum Jump:


Users browsing this thread: 1 Guest(s)