Help ! how to make /members - 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: Help ! how to make /members (
/showthread.php?tid=492489)
Help ! how to make /members -
lizter008 - 04.02.2014
This is from another server
Re: Help ! how to make /members -
Don_Cage - 04.02.2014
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.
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;
}
Re: Help ! how to make /members -
lizter008 - 04.02.2014
not work
Re: Help ! how to make /members -
Don_Cage - 04.02.2014
Quote:
Originally Posted by lizter008
not work
|
Like I said.. It wont work since it doesnt have YOUR variables