/fonline command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /fonline command (
/showthread.php?tid=311470)
/fonline command -
Jordiee - 16.01.2012
anyone got a /flist which shows all online faction members. Thanks.
Re: /fonline command -
milanosie - 16.01.2012
What is ur faction define function
Re: /fonline command -
Jordiee - 16.01.2012
gPlayerData[MAX_PLAYERS]
Re: /fonline command -
Shadow_ - 16.01.2012
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.
Re: /fonline command -
2KY - 16.01.2012
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.