Help With showing players on team
#4

Quote:
Originally Posted by r0b
Посмотреть сообщение
like this:
Код:
// top
#define SLOTS yourslotsfortheserver

// in your command
new aname[20],str[32];
for(new i=0;i<SLOTS;i++) // loops through all slots on the server
{
if(IsPlayerConnected(i) && Teamvar[playerid] ==TEAM_HIDER) // if player is connected and player is in team_hider
// replace Teamvar with your variable for teams, like gTeam
{
GetPlayerName(i,aname,20); // get a name of an alive player
format(string,32,"[ALIVE] %s",aname); // set str's value to "[ALIVE] aname"
SendClientMessage(playerid,COLOR,str); // send str to the player, who typed the command..:D have fun!
}
}
Uhm, lets try something simple.

pawn Код:
if(!strcmp(cmdtext, "/alive", true)) {
     new zzst[24];
     for(new i = 0; i < GetMaxPlayers(); i ++ ) {
           if(!IsPlayerConnected(i)) continue;
           if(GetPlayerTeam(i) == TEAM_HIDER) {
                 GetPlayerName(i, zzst, 24);
                 SendClientMessage(playerid, 0xFFFFFFA, zzst);
           }
     }
}
Reply


Messages In This Thread
Help With showing players on team - by lSCARl - 11.08.2010, 04:27
Re: Help With showing players on team - by ScottCFR - 11.08.2010, 07:07
Re: Help With showing players on team - by r0b - 11.08.2010, 09:12
Re: Help With showing players on team - by Carlton - 11.08.2010, 09:22
Re: Help With showing players on team - by lSCARl - 11.08.2010, 13:50
Re: Help With showing players on team - by Carlton - 11.08.2010, 15:39
Re: Help With showing players on team - by Kar - 11.08.2010, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)