06.11.2009, 22:21
Ok i have this Team chat code, but it doesn't seem to send to the team and it's realy annoying i can't seem to fix it. i don't know what i did wrong.
Код:
if(!strcmp(cmdtext,"/d", true,2)) { if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /d [text] (lspd chat)"); if(gTeam[playerid] != TEAM_LSPD) return SendClientMessage(playerid, 0xAFAFAFAA, "You must be a cop to use this command!"); new playername[MAX_PLAYER_NAME], string[128]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "* *Officer [%s]: %s, over", playername, cmdtext[2]); for(new i = 0; i < MAX_PLAYERS; i++) { // LSPD TEAM CHAT if(gTeam[playerid] == TEAM_LSPD) { SendClientMessage(playerid, COLOR_GOLD, string); } return 1; } return 0; }