SA-MP Forums Archive
Radio Problem - 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 Problem (/showthread.php?tid=382178)



Radio Problem - Akcent_Voltaj - 02.10.2012

i can see the proxdetector..


PHP код:
    if(strcmp(cmd"/radio"true) == || strcmp(cmd"/r"true) == 0)
                    {
                    if(
IsPlayerConnected(playerid))
                    {
                    
GetPlayerName(playeridsendernamesizeof(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++;
                    }
                    if(
PlayerInfo[playerid][pMuted] == 1)
                    {
                    
SendClientMessage(playeridCOLOR_RED"Ai mute nu poti vorbi!");
                    return 
1;
                    }
                    if(
FindIP(result))
                    {
                         new 
advertiser[MAX_PLAYER_NAME];
                         
GetPlayerName(playeridadvertisersizeof(advertiser));
                         
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
SendClientMessageToAll(COLOR_LIGHTGREEN" ");
                        
format(stringsizeof(string), "* %s a primit kick de la BOT, motiv: Reclama Server!",advertiser);
                        
SendClientMessageToAll(COLOR_REDstring);
                           
KickLog(string);
                        
Kick(playerid);
                           return 
1;
                    }
                    
result[idx offset] = EOS;
                    
result[0] = toupper(result[0]);
                    if(!
strlen(result))
                    {
                        
SendClientMessage(playeridCOLOR_GRAD2"USAGE: (/r)adio [radio chat]");
                        return 
1;
                    }
                    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 1)
                    {
                        if(
PlayerInfo[playerid][pRank] == 6) { format(stringsizeof(string), "** Chief %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 5) { format(stringsizeof(string), "** Captain %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 4) { format(stringsizeof(string), "** Lieutenant %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 3) { format(stringsizeof(string), "** Sergeant %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 2) { format(stringsizeof(string), "** Officer %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 1) { format(stringsizeof(string), "** Cadet %s(Radio): %s, over. **"sendernameresult); }
                        else
                        {
                            
format(stringsizeof(string), "%s(Radio): %s"sendernameresult);
                        }
                        
ProxDetector(7.5playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                        
SendRadioMessage(1TEAM_BLUE_COLORstring);
                          
printf("%s"string);
                        return 
1;
                    }
                    else if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 2)
                    {
                        if(
PlayerInfo[playerid][pRank] == 6) { format(stringsizeof(string), "** Director %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 5) { format(stringsizeof(string), "** Assistant Director in Charge %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 4) { format(stringsizeof(string), "** Special Agent in Charge %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 3) { format(stringsizeof(string), "** Special Agent %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 2) { format(stringsizeof(string), "** Special Agent Trainee %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 1) { format(stringsizeof(string), "** Professional Staff %s(Radio): %s, over. **"sendernameresult); }
                        else
                        {
                            
format(stringsizeof(string), "%s(Radio): %s"sendernameresult);
                        }
                        
ProxDetector(7.5playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                        
SendRadioMessage(2TEAM_BLUE_COLORstring);
                         
printf("%s"string);
                        return 
1;
                    }
                    else if(
PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
                    {
                        if(
PlayerInfo[playerid][pRank] == 6) { format(stringsizeof(string), "** Taxi Company Owner %s(Radio): %s. )) **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 5) { format(stringsizeof(string), "** Shift Supervisor %s(Radio): %s. )) **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 4) { format(stringsizeof(string), "** Dispatcher %s(Radio): %s. ))  **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 3) { format(stringsizeof(string), "** Cabbie %s(Radio): %s. ))  **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 2) { format(stringsizeof(string), "** Taxi Rookie %s(Radio): %s. ))  **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 1) { format(stringsizeof(string), "** Trainee %s(Radio): %s. ))  **"sendernameresult); }
                        else
                        {
                            
format(stringsizeof(string), "%s(Radio): %s"sendernameresult);
                        }
                        
ProxDetector(7.5playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                        
SendRadioMessage(10TEAM_YELLOW_COLORstring);
                         
printf("%s"string);
                        return 
1;
                    }
                    else if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 3)
                    {
                        if(
PlayerInfo[playerid][pRank] == 6) { format(stringsizeof(string), "** General %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 5) { format(stringsizeof(string), "** Lieutenant %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 4) { format(stringsizeof(string), "** Captain %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 3) { format(stringsizeof(string), "** Major %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 2) { format(stringsizeof(string), "** Sergeant %s(Radio): %s, over. **"sendernameresult); }
                        else if(
PlayerInfo[playerid][pRank] == 1) { format(stringsizeof(string), "** Private %s(Radio): %s, over. **"sendernameresult); }
                        else
                        {
                            
format(stringsizeof(string), "%s(Radio): %s"sendernameresult);
                        }
                        
ProxDetector(7.5playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                        
SendRadioMessage(3TEAM_BLUE_COLORstring);
                        
printf("%s"string);
                        return 
1;
                    }
                    else if(
gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
                    {
                        
format(stringsizeof(string), "** Paramedic %s(Radio): %s, over. **"sendernameresult);
                        
ProxDetector(7.5playeridstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
                        
SendRadioMessage(4TEAM_CYAN_COLORstring);
                         
printf("%s"string);
                        return 
1;
                    }
                    }
                    return 
1;
                    } 



Re: Radio Problem - doreto - 02.10.2012

What actully is the problem ?


Re: Radio Problem - Akcent_Voltaj - 02.10.2012

i see the proxdetector..and i want to see only sendradiomessage.


Re: Radio Problem - doreto - 02.10.2012

Quote:
Originally Posted by Akcent_Voltaj
Посмотреть сообщение
i see the proxdetector..and i want to see only sendradiomessage.
Delete the proxdetecter if you dont wonna it


Re: Radio Problem - Akcent_Voltaj - 02.10.2012

but the proxdetector doesent it make it so other people see it?


Re: Radio Problem - doreto - 02.10.2012

Quote:
Originally Posted by Akcent_Voltaj
Посмотреть сообщение
but the proxdetector doesent it make it so other people see it?
If you keep it it will send message to people around you but if you remove it it will send it to everyone that doesnt around you (doesnt know what your sendradionmessage function do or it just send messat to teams)

So what you wont ?

1.players will resive your messages if there around you

2.they will resive the messages and they doesnt have to be close to you(SendCliendMessage(playerid,color,your message or string);


Re: Radio Problem - Akcent_Voltaj - 02.10.2012

ex at taxi..member 10..i want all members taxi to get message in yellow and the players around me fade1.fade2.etc


Re: Radio Problem - Akcent_Voltaj - 02.10.2012



see..


Re: Radio Problem - Akcent_Voltaj - 02.10.2012

anyone f* helping??