how to make /members without bug
#1

Any one who can help me to make an /members without bug thanks
Reply
#2

what does /members do? Does it show a list of members with a specified var like gUser[pid][member] == 1?
What is the code in the current command, what variable(s) are storing weather a user is a member or not.
Reply
#3

Quote:
Originally Posted by DeStunter
Посмотреть сообщение
what does /members do? Does it show a list of members with a specified var like gUser[pid][member] == 1?
What is the code in the current command, what variable(s) are storing weather a user is a member or not.
it's pMember,pLeader,pRank,teamnumber
just i don't know what language he need zcmd,strcmp cmd,ycmd...

it gives you info of online/offline members in your faction
Reply
#4

Try like this..
pawn Код:
#define member(%0) ( return PlayerInfo[%0][pMember] )

YCMD:members(playerid, params[], help)
{
   if(!member(playerid))
      return 1;
   SendClientMessage(playerid, -1, "______ MEMBERS ________");
   foreach(Player, i)
   {
       if(member(i,member(playerid))
       new string[16+MAX_PLAYER_NAME], name[24];
       GetPlayerName(i, name, 24);
       format(string, 40, "- %s", name);
       SendClientMessage(playerid, -1, string);
   }
   SendClientMessage(playerid, -1, "______________________");
 
   return true;
}
Reply
#5

Im using cmd:members
Reply
#6

i just found this idk if it fits for you
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)