04.02.2014, 05:08
Help ! how to make /members
04.02.2014, 05:22
This is taken from my old GM. Don't forget that this wont work for you since it's my variables etc.
This is just to show you how it's made.
This is just to show you how it's made.
pawn Код:
if(strcmp(cmd,"/members",true)==0)
{
if(IsPlayerConnected(playerid))
{
new teamnumber;
if (PlayerInfo[playerid][pLeader] != 0) teamnumber = PlayerInfo[playerid][pLeader];
else if (PlayerInfo[playerid][pMember] != 0) teamnumber = PlayerInfo[playerid][pMember];
else
{
SCM(playerid, COLOR_GRAD1, "You are not a member of a team!");
return 1;
}
SCM(playerid, 0x808000AA, "**Members Online**");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string), "");
if (PlayerInfo[i][pLeader] == teamnumber) format(string, sizeof(string), "%s (LEADER)",sendername);
else if (PlayerInfo[i][pMember] == teamnumber) format(string, sizeof(string), "%s, Rank: %d.",sendername, PlayerInfo[i][pRank]);
if (strlen(string) > 1) SCM(playerid, 0xF5DEB3AA, string);
}
}
}
return 1;
}
04.02.2014, 08:06
not work
04.02.2014, 11:03
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)