13.04.2010, 18:07
Could someone make me a small /admins command??
I mean, not from GM's, i need something i can put into my new.pwn.
I mean, not from GM's, i need something i can put into my new.pwn.
if(!strcmp(cmdtext, "/admins", true)) { SendClientMessage(playerid, AAD_COLOR_RED, "* Admins ONLINE"); new count=0; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(IsPlayerAdmin(i)) { new str[255]; new pname[24]; GetPlayerName(i, pname, 24); format(str, 255, "Admin %s", pname); SendClientMessage(playerid, AAD_COLOR_RED, str); count++; } } } if(count == 0) { SendClientMessage(playerid, AAD_COLOR_RED, "* Admins not online!"); } return 1; }
Originally Posted by laser50
Also, how do i make a function like, SendTeamMessage??
or, would this work? if(GetPlayerTeam(playerid) == TEAM_COP) { SendClientMessage(playerid, COLOR_BLUE, "A officer has gone on duty!"); } |
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetPlayerTeam(i) == TEAM_COP)
{
SendClientMessage(i, COLOR_BLUE, "A officer has gone on duty!");
}
}