10.05.2012, 23:41
hi everyone. i have this for my police radio code:
all everything works but wen i type in /policeradio , and im a cop , the message just dont show up? why?
pawn Код:
CMD:policeradio(playerid, params[]) {
if(isnull(params))
return SendClientMessage(playerid, COLOR_RED, "USAGE: /p(olice)r(adio) [message]");
if(gTeam[playerid] !=Team_Police)
return SendClientMessage(playerid, COLOR_RED, "POLICE RADIO FOR TEAM_POLICE!");
new
szMessage[128],
szPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "POLICERADIO: %s: %s", szPlayerName, params);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && gTeam[playerid] !=Team_Police)
SendClientMessage(playerid, 0, szMessage);
}
return 1;
}