09.01.2012, 17:51
Okay, so I have this code:
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.
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;
}