Scripting/Squirrel/Functions/Misc/Announce
From VC-MP Wiki
NOTE: This function has been modified in VC:MP 0.3z r2. It may work as in previous versions, and offer additional functionality.
Sends a player an on-screen message.
Note: An optional style argument has been added to the function for R2. This will either show an announce message in the middle of the screen (style 0) or the bottom of the screen (style 1).
Syntax
bool Announce( string Message, player PlayerTo [, int iStyle ] )
Arguments
- Message - The message to send to the player
- PlayerTo - The player to send the announce to
- iStyle - Announcement style - either 0 or 1
Example
When the player spawns, he will be announced.
function onPlayerSpawn( player ) { Announce( "are you sure?", player, 0 ); }
Notes
- To preview both announce styles, check the opcode 00BA at gtamodding.com. ID 0 will display the announce using Vice City's style 1 and ID 1 will display it with the Vice City's style 3. Other styles can't be used in VC-MP now.
- The call onPlayerSpawn was also used in the example. More info about this in the corresponding page.
Related Functions
- Message
- MessagePlayer
- MessageAllExcept
- PrivMessage
- PrivMessageAll
- ClientMessage
- ClientMessageToAll
- Announce
- AnnounceAll
- SendPlayerMessage
- KickPlayer
- BanPlayer
- BanIP
- UnbanIP
- GetWeaponName
- GetWeaponID
- GetDistrictName
- GetSkinName
- GetTickCount
- GetTime
- GetFullTime
- IsNum
- BindKey
- UnbindKey
- CallFunc
- InPoly
- DistanceFromPoint
- ReloadScripts
