Question last one
#1

I was working on a Radio feature so that when a player talks whosoever stands nearby him could see what ever he says the problem is the player who uses the Radio also sees the message that the other players are seeing, he sees a Radio one, and for the nearby people one, Double messages.
is there any way to make only the players see the nearby message so that he will see only what he wrote on the Radio ?.
this is the code of the message the nearby players would see.
pawn Код:
format(string, sizeof(string), "(Radio) %s says: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
Reply
#2

add that at /radio? so people from far and near can see this text... just add 2 strings
Reply
#3

I did it, it works, I just see double messages I see what the people can see and what I sent.
like:
(Radio)Hey. what the people can see who stand nearby.
(RadioHey mine
Reply
#4

Do you have a loop for showing text?? it seems you don't stop the player that is writing the text from seeing the text. Could do with seeing a little more code tbh. If the text is in a loop try something like this,
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
    if(i == playerid)continue;//if i == playerid jump to end of loop without showing text
    SendClientMessage(i, COLOR, "blahblah");
}
That'l stop the player who is writting from seeing the text. Not sure if thats your problem its quite hard for me to understand your problem from the description hope this helps anyway.

PS, I've never used proxdetector so i haven't a clue how it should be used.
Reply
#5

This is the whole script.
Radio for a certain Faction.
pawn Код:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
            {
                if(PlayerInfo[playerid][pRank] == 8) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "**[Police CH, 1] %s: %s ", sendername, result); }
                else
                {
                format(string, sizeof(string), "(Radio) %s says: %s", sendername, result);
                }
                ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
               
                SendRadioMessage(1, 0xFFFFB0FF, string);
                printf("%s", string);
                return 1;
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)