How to make a /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: How to make a /members command (
/showthread.php?tid=283188)
How to make a /members command -
JiMadness - 13.09.2011
I use ZCMD
I need to know how to make a /members command for factions and families...
Re: How to make a /members command -
admantis - 13.09.2011
What script are you using? it's important to know what array or variable are you using for the player family.
Re: How to make a /members command -
Basicz - 13.09.2011
pawn Код:
COMMAND:members( playerid, params[ ] )
{
for ( new i, p = GetMaxPlayers( ); i < p; i ++ )
{
if ( !IsPlayerConnected( playerid ) )
continue;
new iName[ 24 ], nameFormat[ 32 ], totalString[ 500 ] = "No one";
if ( gTeam[ i ] == gTeam[ playerid ] )
{
GetPlayerName( playerid, iName, 24 );
format( nameFormat, 32, "%s \n", nameFormat );
strcat( totalString, nameFormat );
}
}
ShowPlayerDialog( playerid, 1777, DIALOG_STYLE_LIST, "Gang members", totalString, "Okay", "Okay" );
return 1;
}