Radio help
#1

Hey, I'm working on /radio command for emergency factions.. well I did it but the next thing which I have no idea how to even start.. plus I searched around the forums but couldn't find an answer..

anyway.. I'm trying to make that like in real life,
when cops using the their radio people around can hear but that's not my problem.. the idea that if I send a radio message and another player from my faction get it, people around HIM will hear voices from the radio..

I hope I explained.. well I have no idea even how to start that..

if someone would EXPLAIN how to start and do it, thanks a lot!
Reply
#2

1) Are you using ZCMD? 2) You can make the text above his head asif they can hear them

If your using ZCMD, I send you mine.
Reply
#3

Nop, I'm using Strcmp

and someone else got any other ideas?
Thanks
Reply
#4

Sorry for bumping, but that's what I did.. I dont have way right now to check it.. I need someone to tell me if it will work.. I just added to the command that para1 with the returnuser.. I dont sure that it will work... anyway..

pawn Код:
if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
    {
        GetPlayerName(playerid, sendername, sizeof(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++;
        }
        new para1;
        para1 = ReturnUser(tmp);
        result[idx - offset] = EOS;
        if(!strlen(result))
        {
            SendClientMessage(playerid, COLOR_GRAD2, "{33CCFF}USAGE:{FFFFFF} (/R)adio Chat [text] ");
            return 1;
        }
        if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
        {
            if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Colonel Station %s: %s, over. **", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Detective %s: %s, over. **", sendername, result); }
            else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
            else if(PlayerInfo[playerid][pLeader] == 1)
            {
                format(string, sizeof(string), "** Colonel Station %s: %s, over. **", sendername, result);
            }
            SendRadioMessage(1, TEAM_AZTECAS_COLOR, string);
            format(string, sizeof(string), "%s using his radio : %s", sendername, result);
            ProxDetector(25.0, playerid, string, COLOR_ORANGE,COLOR_ORANGE,COLOR_ORANGE,COLOR_ORANGE,COLOR_ORANGE);
            if (PlayerInfo[playerid][pMember] != 1 || PlayerInfo[playerid][pLeader] != 1)
            {
                format(string, sizeof(string), "Voices comming from %s's Radio", sendername);
                ProxDetector(15.0, para1, string, COLOR_ORANGE,COLOR_ORANGE,COLOR_ORANGE,COLOR_ORANGE,COLOR_ORANGE);
                return 1;
            }
        }
        return 1;
    }
Reply
#5

Qur, Not trying to be a downer, but I Suggest you switch to Zcmd, It's much faster and easy'r to use.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)