SA-MP Forums Archive
[help]sendmassage - 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]sendmassage (/showthread.php?tid=328559)



[help]sendmassage - bboytimix - 25.03.2012

hello guys i need help with:
to send a clinet massage[exmple] if(maxplayers)= team=1
maxplayers = all players
so if all players on team 1
then will wroten to all "team 1 won"
please help
thanx a lot to helper


Re: [help]sendmassage - bboytimix - 25.03.2012

help please


Re: [help]sendmassage - iGetty - 25.03.2012

Please explain more, with proper use of English.

Use translate.******.com and translate it from your own language. Or even type it here in your own language and maybe one of us can help you. I will certainly try, thanks.


AW: [help]sendmassage - Campbell- - 25.03.2012

If you set your teams like that (https://sampwiki.blast.hk/wiki/SetPlayerTeam) it could be solved like that:

pawn Код:
new team = GetPlayerTeam(playerid); // Checking in which team the player executing the command is.
for(new i; i < MAX_PLAYERS; i++) // Looping through all players.
{
   if(GetPlayerTeam(i) == team) // Checking if player i is apart of the same team.
   {
      SendClientMessage(i, YOUR_COLOR, "This is a message to my team."); // If true, send the message.
   }
}