[HELP] Police Radio
#5

Right code:

pawn Код:
if(strcmp(cmd, "/radio", true) == 0)
    {
        if(gTeam[playerid] == TEAM_LSPD || TEAM_FBI || TEAM_CIA)
            {
                if ((strlen(cmdtext) > 7)&&(strlen(cmdtext) <= 50))
                    {
                    new name[MAX_PLAYERS];
                    new message[128];
                    strmid(message,cmdtext,7,strlen(cmdtext));
                    GetPlayerName(playerid,name,sizeof(name));
                    format(string,sizeof(string),"-> Police Radio(%s): %s", name, message);
                    SendCopMessage(0xFFFF00AA, string);
                    return 1;
                    }

                    else return SendClientMessage(playerid, 0xFFFF00AA, "-> You mean: /radio [Message]");
                    }

                    else return SendClientMessage(playerid, 0xFFFF00AA, "-> You are not a Cop!");
                    }

Reply


Messages In This Thread
[HELP] Police Radio - by FreddeN - 25.05.2009, 16:29
Re: [HELP] Police Radio - by FreddeN - 25.05.2009, 17:13
Re: [HELP] Police Radio - by Klutty - 25.05.2009, 17:22
Re: [HELP] Police Radio - by JoeDaDude - 25.05.2009, 19:54
Re: [HELP] Police Radio - by Hot - 25.05.2009, 20:24

Forum Jump:


Users browsing this thread: 1 Guest(s)