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



SCM - Hunud - 22.08.2016

How do i send a SCM to centrail team ?

sry bad english


Re: SCM - WhiteGhost - 22.08.2016

What?


Re: SCM - Hunud - 22.08.2016

How to send a SCM to each team just for example russia when somebody attack zone


Re: SCM - Shinja - 22.08.2016

PHP код:
stock SCMToTeam(teamidcolormsg)
{
    for(new 
ij=GetPlayerPoolSize(); i<=ji++)
    {
        if(
IsPlayerConnected(i) && GetPlayerTeam(i) == teamidSendClientMessage(icolormsg);
    }




Re: SCM - Konstantinos - 22.08.2016

@Shinja:
Код:
for(new i, j=GetPlayerPoolSize(); i<=j; i++)
otherwise the last player will always excluded.


Re: SCM - Shinja - 22.08.2016

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
@Shinja:
Код:
for(new i, j=GetPlayerPoolSize(); i<=j; i++)
otherwise the last player will always excluded.
Thanks. yes it's not same as MAX_PLAYERS


Re: SCM - Gammix - 22.08.2016

@Shinja: You didn't added a connection check as well.


Re: SCM - Shinja - 22.08.2016

Quote:
Originally Posted by Gammix
Посмотреть сообщение
@Shinja: You didn't added a connection check as well.
Added, thanks


Re: SCM - Konstantinos - 22.08.2016

Quote:
Originally Posted by Gammix
Посмотреть сообщение
@Shinja: You didn't added a connection check as well.
As long as "GetPlayerTeam" is used, it doesn't really matter because if the player is not connected the function returns -1.
If he uses variables to determinate the team for each player, then okay.