Help creating cmd
#1

I need to create a cmd /factionleaders to show all facs with its leader.
I would like to edit it IG so any ideas?
Thanks
Reply
#2

Hello dani44, you can use the properties and variables of your GM, just create a Loop through all players / factions id and print them and do what's best for you.

Logical example:
PHP код:
for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerLeader(i))
    {
        
printf("%s"PlayerName(i));
    }

IsPlayerLeader is a function that you can create to check, you can do the same with the factions, just adapt the loop according to your need.

You can take a better look by CLICKING HERE.
Reply
#3

Quote:
Originally Posted by ApolloScripter
Посмотреть сообщение
Hello dani44, you can use the properties and variables of your GM, just create a Loop through all players / factions id and print them and do what's best for you.

Logical example:
PHP код:
for(new 0MAX_PLAYERSi++)
{
    if(
IsPlayerLeader(i))
    {
        
printf("%s"PlayerName(i));
    }

IsPlayerLeader is a function that you can create to check, you can do the same with the factions, just adapt the loop according to your need.

You can take a better look by CLICKING HERE.
I can try it but how should i edit that ingame if a leader changes?
Reply
#4

Quote:
Originally Posted by dani44
Посмотреть сообщение
I can try it but how should i edit that ingame if a leader changes?
Ok, let's assume that you store the name of each leader in a variable name [50]; Whenever this variable changes, the loop will change too, but like I said, you need to see how this works in your GM
Reply
#5

Solved, close please.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)