How to make a Leader
#2

pawn Код:
enum GANG_MAIN {
    GANG_ID, //ID Della gang
    GANG_NAME[20], //Nome della gang
    GANG_LEADER[4],
    GANG_COLOR, //Colore della gang
    GANG_NZONE, //Numero di gang zone conquistate
    GANG_MEMBERS //Numero membri della gang
}
new GangInfo[MAX_GANG][GANG_MAIN];

CMD:setclanleader(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(IsPlayerAdmin(playerid))
        {
            new nom[MAX_PLAYER_NAME],string[200],pplayerid,rom[MAX_PLAYER_NAME];
            if(GangInfo[pplayerid][GANG_LEADER] != 1)
            {
                if(sscanf(params,"u",pplayerid)) return SCM(playerid, -1,""COL_RED"[ERROR]: /setclanleader [playerid]");
                GetPlayerName(playerid,rom,sizeof(rom));
                GetPlayerName(pplayerid,nom,sizeof(nom));
                format(string,sizeof(string),""COL_LIME"*You Have Successfully set %s as clan leader",nom);
                SCM(playerid, -1,string);
                format(string,sizeof(string),""COL_GREEN"*Admin %s Has Made you [Test]Clan leader now you can control server clan!",rom);
                SCM(playerid, -1,string);
                GangInfo[pplayerid][GANG_LEADER]= 1;
            }else return SCM(playerid,-1,""COL_RED"[ERROR]Player is already In Clan");
        }else return SCM(playerid, -1,""COL_RED"[ERROR] You need to be RCON admin to use this Command.");
    }else return SCM(playerid, -1,""COL_RED"[ERROR] Player Not Connected!" ) ;
    return 1;
}
Reply


Messages In This Thread
How to make a Leader - by Loveno - 28.05.2014, 04:06
Re: How to make a Leader - by MacT - 28.05.2014, 06:58
Re: How to make a Leader - by Loveno - 28.05.2014, 11:42
Re: How to make a Leader - by MacT - 28.05.2014, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)