/members 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: /members command (
/showthread.php?tid=354266)
/members command -
trulis - 26.06.2012
I have a rpg server and i need a command /members that shows the online members of your factions and their rank, can someone help me ?
Re: /members command -
-CaRRoT - 26.06.2012
Ehm.. Sure - Check your PM's
Re: /members command -
trulis - 26.06.2012
I forgot to mention that the gamemode is a GF edit, so can someone help me ?
Re: /members command -
iGetty - 26.06.2012
Can you post the Member thing? Like
PlayerData[playerid][pMember] Or whatever it is.
Thanks!
Re: /members command -
trulis - 26.06.2012
PlayerInfo[playerid][pMember] and PlayerInfo[playerid][pLeader]
Re: /members command -
iGetty - 26.06.2012
Then do this:
pawn Код:
command(members, playerid, params[])
{
new string[256];//It will add on to the string each time it finds a member, so you need a big-ish string.
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pMember] == PlayerInfo[i][pMember])
{
format(string, sizeof(string), "%s\n%s", string, pName(i));
}
}
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_LIST, "Member(s) online", string, "OK", "");
return 1;
}