SA-MP Forums Archive
How? - 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: How? (/showthread.php?tid=656392)



How? - Man43 - 14.07.2018

Can someone send to me a tutoiral of When someone be arrested or ticket send the message to ALL POLICE I mean example: [POLICE TEAM]: %s has been arrested by FBI %s [I need a police team message's] When someone be ticket or arrested like that how?


Re: How? - RedRex - 14.07.2018

Here you go I hope if u mean that.

Under command: you want

Код:
format(string, sizeof(string), "[ARRESTED]: %s [%d] has been arrested by  %s [%d]", name,player,targetname,targetid);
		CopRadio(BLUE, string);
PHP код:
stock CopRadio(color,const string[])
{
    foreach(new 
Player)
    {
        if(
GetPlayerState(i) != PLAYER_STATE_NONE)
        {
            if(
GetTeam{i} == CLASS_COPS || GetTeam{i} == CLASS_CIA || GetTeam{i} == CLASS_FBI || GetTeam{i} == CLASS_ARMY)
            {
                
SendClientMessage(icolorstring);
            }
        }
    }
    return 
1;




Re: How? - Man43 - 14.07.2018

Thank you . I've editing it and it's worked