[CMD] /makeleader
#5

i'm not sure but this have to work....

PHP код:
CMD:makeleader(playeridparams[])
{
    new 
giveplayeridfacstr[126];
    if(
PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playeridCOLOR_GREY"You are not authorized to do this.");
    if(
sscanf(params"ui"giveplayeridfac)) return SendClientMessage(playerid, -1"USAGE: /makeleader [playerid/partofname] [faction]");
    if(
fac || fac 5) return SendClientMessage(playerid, -1"Valid faction number is 1-5");
    
PlayerInfo[playerid][pFacLeader] = fac;
    
PlayerInfo[playerid][pFaction] = fac;
    
PlayerInfo[playerid][pFacRank] = 6;
    
format(strsizeof(str), "You have been give leadership powers over %s by %s."GetFactionName(fac), GetName(playerid));
    
SendClientMessage(giveplayeridCOLOR_CYANstr);
    
format(strsizeof(str), "You have give %s leadership powers over %s."GetName(playerid),GetFactionName(fac));
    
SendClientMessage(playerid, -1str);
    return 
1;

Reply


Messages In This Thread
[CMD] /makeleader - by BarFix - 31.10.2015, 14:40
Re: [CMD] /makeleader - by IceBilizard - 31.10.2015, 14:43
Re: [CMD] /makeleader - by BarFix - 31.10.2015, 14:55
Re: [CMD] /makeleader - by Patrick - 31.10.2015, 15:01
Re: [CMD] /makeleader - by jlalt - 31.10.2015, 15:08
Re: [CMD] /makeleader - by BarFix - 31.10.2015, 15:57
Re: [CMD] /makeleader - by AchievementMaster360 - 31.10.2015, 16:03
Re: [CMD] /makeleader - by BarFix - 31.10.2015, 16:05

Forum Jump:


Users browsing this thread: 1 Guest(s)