Need example with makeleader command
#1

I have got three organizations/factions.
Hospital
PD(PoliceDepartment)
Civilian(Not organization... However :P)

So i need a little example with /makeleader [name/id] [ORGname].

I tried to make it but i get more than 10 errors so i quit

Thank you for you support.
Reply
#2

show us your try
Reply
#3

DELETED! Because of errors and i couldn't compile and start my server. I am using sscanf and zcmd. So if you could help thank you. You don't have to put explanations and stuff like that!
Reply
#4

PHP код:
#define IsAdm PlayerInfo[playerid][pAdmin]
#define IsFac[%0] PlayerInfo[%0][pClan]
#define IsFacLead[%0] PlayerInfo[%0][pClLeader]
CMD:makeleader(playeridparams[])
{
    if(
Logged[playerid] == 1)
    {
        new 
targetidamountstring[128];
        if( 
IsAdm 5) return SendClientMessage(playerid, -1"ERROR:{FFFFFF} You are not authorized to use that command.");
        if(
sscanf(params"ud"targetidamount)) return SendClientMessage(playerid, -1"USAGE:{FFFFFF} /makeleader [playerid] [ID]");
        if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1"ERROR:{FFFFFF} That player isn't online.");
        if( 
IsFac[targetid] != 0) return SendClientMessage(playerid, -1"ERROR:{FFFFFF} That player is already a member of a clan.");
        if( 
IsFacLead[targetid] != 0) return SendClientMessage(playerid, -1"ERROR:{FFFFFF} That player is already a leader of a clan.");
        if(
amount 6) return SendClientMessage(playerid, -1,"ERROR:{FFFFFF} You can only choose from 1-6.");
        if(
amount 1) return SendClientMessage(playerid, -1"ERROR:{FFFFFF} You can only choose from 1-6.");
        else
        {
            
format(ClanInfo[amount-1][cLeader], 128"%s"GetName(targetid));
            
ClanInfo[amount-1][cMembers]++;
             
IsFac[targetid] = amount;
               
IsFacLead[targetid] = 6;
            
SaveFact(IsFac[targetid]-1); // IsFac[targetid]-1 the new id of fact or clan :p 
        
}
    }
    return 
1;

you need to make yourself the save i havent any informations about your stock system save
Reply
#5

You made this for 10 minutes i would making this 10 days!! Thanks !! Rep+
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)