SA-MP Forums Archive
Radio Help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Radio Help. (/showthread.php?tid=309906)



Radio Help. - iGetty - 09.01.2012

Okay, so I have this code:

pawn Код:
command(r, playerid, params[])
{
    if(gPlayerData[playerid][Radio] == 1)
    {
        new Message[128], string[128];
        if(sscanf(params, "z", Message)) return SendClientMessage(playerid, GREY, "Server: /r(adio) [message]");
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(gPlayerData[playerid][RadioTune] == gPlayerData[i][RadioTune])
                {
                    format(string, sizeof(string), "{996600}[Radio chat] %s [%d - MHz] says: %s", RemoveUnderScore(playerid), gPlayerData[playerid][RadioTune], Message);
                    SendClientMessage(i, YELLOW, string);
                    format(string, sizeof(string), "%s says (radio): %s", RemoveUnderScore(playerid), Message);
                    NearByMessage(playerid, WHITE, string);
                    return 1;
                }
            }
        }
    }
    else return SendClientMessage(playerid, GREY, "You don't have a Radio.");
    return 1;
}
I have a problem. I don't get Errors/Warnings on the Pawno application, but when in game on 2 laptops (To test if it is working or not) I do /r test. Then on my screen it shows what it's supposed to show, but on the Other screen it only shows the nearbymessage thing, instead of on the Radio. so when I'm like, far away from the player, I can't see what he typed on /r. If anybody can help me, that'll be great. PS: I have tuned both to the same channel.


Re: Radio Help. - iGetty - 10.01.2012

It's been over 24 hours. Any help will be appreciated.


Re: Radio Help. - rinori - 10.01.2012

If you type a message, the playerid cant see the message or the other players?