if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GREY, " USAGE: (/r)adio [text]"); return 1; } if(gTeam[playerid] == 10) { if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else { format(string, sizeof(string), "** %s: %s **", sendername, result); } ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); SendRadioMessage(10, COLOR_LIGHT_YELLOW, string); return 1; } else if(gTeam[playerid] == 11) { if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else { format(string, sizeof(string), "** %s: %s **", sendername, result); } ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); SendRadioMessage(11, COLOR_LIGHT_YELLOW, string); return 1; } else if(gTeam[playerid] == 12) { if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else { format(string, sizeof(string), "** %s: %s **", sendername, result); } ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); SendRadioMessage(12, COLOR_LIGHT_YELLOW, string); return 1; } else if(gTeam[playerid] == 13) { if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** %s: %s **", sendername, result); } else { format(string, sizeof(string), "** %s: %s **", sendername, result); } ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); SendRadioMessage(13, COLOR_LIGHT_YELLOW, string); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " You are not part of the Law Enforcement."); return 1; } } return 1; }
Originally Posted by (SF)Noobanatior
who should see the prox msgs then? is the proxdetector a func in your mode can i see that 2
|
Originally Posted by (SF)Noobanatior
can i see the proxdetector code? does the other lpayers see the prox msgs?
|
format(string, sizeof(string), "** %s: %s **", sendername, result); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); SendRadioMessage(10, COLOR_LIGHT_YELLOW, string); return 1;
OnPlayerText(playerid,text[]){
if(!strcmp(text,"",false,1)){
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(text,140,"%s sussurra: %s",pname,text[1]);
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerInRangeOfPoint(i,8.0,x,y,z)){//DISTANCE
SendClientMessage(i,0xFFFFFFAA,text);
}
}
return false;
}
}