need help with /setadmin command ! fast
#2

pawn Код:
CMD:setadmin(playerid,params[])
{
    new ID;
    new Level;
    new AdminName;
    new string[128];
    if(PlayerInfo[playerid][Admin] >= 5)
    {
        if(sscanf(params,"ii", ID, Level)) return SendClientMessage(playerid,-1,"{FF0000}USAGE: {15FF00}/SetAdmin [ID] [Level]");
        PlayerInfo[playerid][Admin] = Level;
        format(string, sizeof(string), "{FF0000}[INFO]: {15FF00}You gave to {FF0000}%s {15FF00}Admin Level {0066CC}: %s", ID, Level);
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), "{FF0000}[INFO]: {15FF00}Admin {FF0000}%s {15FF00}has setted your Admin Level to{0066CC}: %s", AdminName, Level);
        SendClientMessage(ID, -1, string);
    }
    else
    {
        SendClientMessage(playerid, -1, "You need to be Admin Level 5 !");
    }
    return 1;
}

stock GetAdminName(playerid)
{
    GetPlayerName(playerid, AdminName);
}

/*

Can optimize him, I worked 5 minutes at it

*/
http://www.solidfiles.com/d/ba2f/sscanf.inc

http://www.solidfiles.com/d/d20f/zcmd.inc
Reply


Messages In This Thread
need help with /setadmin command ! fast - by Toxik - 04.11.2014, 16:18
Re: need help with /setadmin command ! fast - by HY - 04.11.2014, 16:27
Re: need help with /setadmin command ! fast - by Toxik - 04.11.2014, 16:30
Re: need help with /setadmin command ! fast - by mkmk - 04.11.2014, 16:36
Re: need help with /setadmin command ! fast - by DavidBilla - 04.11.2014, 17:23
Re: need help with /setadmin command ! fast - by Toxik - 04.11.2014, 17:28
Re: need help with /setadmin command ! fast - by iShawn - 04.11.2014, 17:54
Re: need help with /setadmin command ! fast - by Stinged - 04.11.2014, 18:02
Re: need help with /setadmin command ! fast - by DavidBilla - 04.11.2014, 18:03
Re: need help with /setadmin command ! fast - by mkmk - 04.11.2014, 18:39

Forum Jump:


Users browsing this thread: 2 Guest(s)