Scripting/Squirrel/Functions/ClientMessageToAll: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Syntax ==
== Syntax ==
 
1
<pre>ClientMessageToAll( message, R, G, B )</pre>
<pre>ClientMessageToAll(message, r, g, b)</pre>
2
<pre>ClientMessageToAll(message, r, g, b, a)</pre>


== Arguments ==
== Arguments ==
 
1
* ''string'' '''message''' - The message to send
* ''int'' '''r''' - The amount of red
* ''int'' '''g''' - The amount of green
* ''int'' '''b''' - The amount of blue
2
* ''string'' '''message''' - The message to send
* ''string'' '''message''' - The message to send
* ''int'' '''R''' - The amount of red
* ''int'' '''r''' - The amount of red
* ''int'' '''G''' - The amount of green
* ''int'' '''g''' - The amount of green
* ''int'' '''B''' - The amount of blue
* ''int'' '''b''' - The amount of blue
* ''int'' '''a''' - The amount of alpha


== Example ==
== Example ==
<source lang=squirrel>
<source lang=squirrel>
function onPlayerTeamKill( killer, player, reason, bodypart )
function onPlayerTeamKill(killer, player, reason, bodypart)
{
{
ClientMessageToAll( killer+" killed team-mate "+ player, 85, 107, 47 );
ClientMessageToAll(killer+" killed team-mate "+ player, 85, 107, 47);
return 1;
}
}
</source>
</source>
=== Notes ===
=== Notes ===
Call [[onPlayerTeamKill]] were used in this example. More info about them in the corresponding pages.
Call [[onPlayerTeamKill]] were used in this example. More info about them in the corresponding pages.


== Related Functions ==
== Related Functions ==
{{Scripting/Squirrel/Functions/Messages}}
{{Scripting/Squirrel/Functions/Messages}}
[[Category:Scripting/Squirrel/Functions/Message_Functions]]

Latest revision as of 18:18, 30 January 2017

This function will send a coloured message to every player in the server.

Syntax

1

ClientMessageToAll(message, r, g, b)

2

ClientMessageToAll(message, r, g, b, a)

Arguments

1

  • string message - The message to send
  • int r - The amount of red
  • int g - The amount of green
  • int b - The amount of blue

2

  • string message - The message to send
  • int r - The amount of red
  • int g - The amount of green
  • int b - The amount of blue
  • int a - The amount of alpha

Example

function onPlayerTeamKill(killer, player, reason, bodypart)
{
	ClientMessageToAll(killer+" killed team-mate "+ player, 85, 107, 47);
	return 1;
}

Notes

Call onPlayerTeamKill were used in this example. More info about them in the corresponding pages.

Related Functions