Factions/Organizations.
#1

Can someone show me a script which I'd like to make like this; there are no ******* tutorials for this, and I'm not so pro to make it.


/setleader or something to make someone a leader of a organization
/setrank 1/5 ranks..
/f chat
and can someone help me how to make a only faction controlled radio...?
/fkick to kick someone out of faction, can someone make all that, I'd be really glad, and I'll do anything
So:

Faction named LVPD
/setleader doesn't need to have any restrictions ( gonna add it in owner-admin only, later )
/fkick ( kick someone out of that team/faction )
/setrank ( rank 1/5 etc.
rank 1 Cadet
rank 2 Officer
rank 3 etc... you name it )
/f chat ( in blue if possible )
Thank you very much if you make this I'm gonna give REP 1+ and my friend is going to give you rep 1+

EDIT: If you want to help me make it in Format if you can, thanks.
Reply
#2

well it's easy,add under pInfo or PlayerInfo in your gamemode as enum :
pawn Код:
pFaction
pLeader
and Use zcmd to make a command with params,the params should be the faction id and the playerid,and make the second params as the faction id,and set his [Faction] to the second param,and also [pLeader] to the second radar,example:
pawn Код:
CMD:makeleader(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new sendername[MAX_PLAYER_NAME],level,giveplayerid,giveplayer[MAX_PLAYER_NAME],string[128];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        if(sscanf(params,"ud",giveplayerid,level)) return SendClientMessage(playerid, -1, "/makeleader [playerID] [faction id]");
                // now if he used the both params:
                pInfo[giveplayerid][pFaction] = level;
                pInfo[giveplayerid][pLeader] = level;
                format(string, sizeof(string), "* You have been promoted to Leader Of the Faction %d by %s",level, sendername);
                SendClientMessage(giveplayerid, -1, string);
         }
         return 1;    
}
and for faction radio, loop the players as i,and then detect if the others are in the same faction as the playerid's faction,if yes send them the message:
pawn Код:
//do the command,and for sending message:
for(new i = 0; i < MAX_PLAYERS; i++)
{
      if(pInfo[i][pFaction] == pInfo[playerid][pFaction]) // means that the other player has the same faction
      {
             SendClientMessage(playerid, -1, string); //use string to get the params he wrote,and it will be sent and used here
       }
}
and same for /f,
and /fkick,Just the same as /makeleader,but set the faction to 0
and ranks,you can define them in the gamemode,like :
pawn Код:
if(pInfo[playerid][pRank] == 1)
{
 // make his rank name as a cadet and same for other ranks...
}
it's easy,just do what i have told you
Reply
#3

I'm going to paste this somewhere since I'm too sleepy I'm going to screw up something. If you could, PM me so we can talk about something else..ok?
Reply
#4

But I don't have an organization created, nor do I know how to make *ONLY* organization gate controlled. Etc. A guy that is not in LVPD tries to /opengate and it says [LVPD]Only police officers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)