radio help! -
Don_Cage - 14.09.2012
Hello. ive made a ''senate'' radio wich i want all the criminal factions be able to see but the radio dosnt send out to any of the factions.. what have a done wrong?
pawn Код:
if(strcmp(cmd, "/Senate", true) == 0 || strcmp(cmd, "/sen", true) == 0)
{
if(PlayerInfo[playerid][pMara] == 0)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You are NOT part of the Senate!");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/sen)ate [senate radio annouce]");
return 1;
}
if(PlayerInfo[playerid][pMara] == 1)
{
if(PlayerInfo[playerid][pMara] == 1) { format(string, sizeof(string), "[Criminal Senate]:(radio): %s, over.", result);}
else if(PlayerInfo[playerid][pMara] == 2) { format(string, sizeof(string), "[Criminal Senate]:Senior Senator (radio): %s, over.", result);}
else if(PlayerInfo[playerid][pMara] == 3) { format(string, sizeof(string), "[Criminal Senate]:Lead Senator (radio): %s, over.", result);}
else if(PlayerInfo[playerid][pMara] == 4) { format(string, sizeof(string), " [Unknown] [Criminal Senate] (radio): %s, over.", result);}
ProxDetector(7.5, playerid, string,COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SentMessage[playerid] = 1;
SendRadioMessage(5 && 6 && 8 && 13 && 14 && 15 && 16 && 17 && 18, TEAM_RADIO_COLOR, string);
SentMessage[playerid] = 1;
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,d);
format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (radio): (%s)",d,m,y,h,mi,s, result);
RadioChatLog(string);
return 1;
}
return 1;
}
Re: radio help! -
Don_Cage - 14.09.2012
a friend said that it was something wrong with this lines
pawn Код:
ProxDetector(7.5, playerid, string,COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SentMessage[playerid] = 1;
SendRadioMessage(5 && 6 && 8 && 13 && 14 && 15 && 16 && 17 && 18, TEAM_RADIO_COLOR, string);
SentMessage[playerid] = 1;
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,d);
format(string, sizeof(string), "[%d/%d/%d](%d:%d:%d) %s (radio): (%s)",d,m,y,h,mi,s, result);
RadioChatLog(string);
return 1;
}
return 1;
}
but he wasnt sure.
Re: radio help! -
Don_Cage - 14.09.2012
please help me, i realy need this!
Re: radio help! -
MrBorsh - 14.09.2012
Error message?
Re: radio help! -
Don_Cage - 14.09.2012
Quote:
Originally Posted by MrBorsh
Error message?
|
no errors, it just dosent send out to any of the faction numbers 5, 6, 8, 13, 14, 15, 16, 17 or 18
Re: radio help! -
Don_Cage - 14.09.2012
like if i type "/sen test" it dosent show on the other radios, it only shows for me that i said it but noone else see it
Re: radio help! -
Don_Cage - 14.09.2012
anyone knows the problem?
Re: radio help! -
Don_Cage - 15.09.2012
bump
Re: radio help! -
clarencecuzz - 15.09.2012
Can you show your SendRadioMessage function?
Re: radio help! -
mamorunl - 15.09.2012
Never seen this function before:
pawn Код:
SendRadioMessage(5 && 6 && 8 && 13 && 14 && 15 && 16 && 17 && 18, TEAM_RADIO_COLOR, string);
Mind showing the stock/public for this function?