Help doing /r(adio) command for Cops.
#1

Well, i am trying to make an /r command.. A simple one, that only display the text, like any other chat, but only for cops. I made many tries, but always fail cos i have no idea how to check cops online, and how to sennd them message.. If you can help me, i would be greatful.

The variable that check cops is:
pawn Код:
if(PlayerInfo[playerid][Fmember] == 1)
Thank you very much.
Reply
#2

how to check cops :
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
        if(PlayerInfo[i][Fmember] == 1)
        {
                // cop online.
        }
}
Reply
#3

Well, it helped me much.. Btw, how do i send a message to all cops?
Reply
#4

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
        if(PlayerInfo[i][Fmember] == 1)
        {
                format(string, sizeof(string), "* (Radio) %s: %s, over.", sendername, result); // define sendername and result also color and string.
                SendClientMessage(i, COLOR, string);
        }
}
Just one example, now you make the command for making the result, but its just an example of how to send the message to all players from that variable.
Reply
#5

Done. Thank you very much to both. +Rep done.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)