Help doing /r(adio) command for Cops. - 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: Help doing /r(adio) command for Cops. (
/showthread.php?tid=310770)
Help doing /r(adio) command for Cops. -
ricardo178 - 13.01.2012
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.
Re: Help doing /r(adio) command for Cops. -
CmZxC - 13.01.2012
how to check cops :
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][Fmember] == 1)
{
// cop online.
}
}
Re : Help doing /r(adio) command for Cops. -
ricardo178 - 13.01.2012
Well, it helped me much.. Btw, how do i send a message to all cops?
Re: Help doing /r(adio) command for Cops. -
rinori - 13.01.2012
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.
Re : Help doing /r(adio) command for Cops. -
ricardo178 - 13.01.2012
Done. Thank you very much to both. +Rep done.