/fonline command
#1

anyone got a /flist which shows all online faction members. Thanks.
Reply
#2

What is ur faction define function
Reply
#3

gPlayerData[MAX_PLAYERS]
Reply
#4

There must be 100 scripts on here that have a /flist command.

Go to Gamemodes > download the first RP script you see > open > ctrl+f > flist, factiononline, fonline ect.
Reply
#5

pawn Код:
if (strcmp( "/fonline", cmdtext, true, 8) == 0)
    {
        new
            string[128],
            p_Name[24]
        ;
        SendClientMessage(playerid, 0xFF0000FF, "* Online Faction Members:");
        for(new u = 0; u < MAX_PLAYERS; u++) { //Looping through all the players, for what? We don't know yet.
            if(gPlayerData[u][Faction] != 0) { //Checking if the looped players are in a faction (I'm assuming you don't use Faction ID zero.
           
                GetPlayerName(u, p_Name, 24); //Max length of SA:MP Nicknames is 24 characters!
               
                format(string, sizeof(string), "[Faction: %d] %s [Rank: %d]", gPlayerData[u][Faction], p_Name, gPlayerData[u][FactionRank]); //Creating the actual message itself, this is where you add their faction id, name, and rank!
                SendClientMessage(playerid, 0xFFFFFF, string); //Send them the specified string!
            }
        }
        return 1;
    }
I have left little comments on things to help you possibly learn.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)