From Multi Theft Auto: Wiki
Revision as of 22:59, 28 December 2014 by Strix (talk | contribs)

Jump to: navigation, search

This function allows you to change ASE announce values for any player using a specified key. As an example this can be used to change the "score" value which will be shown at's server list.


bool setPlayerAnnounceValue ( element thePlayer, string key, string value )

OOP Syntax Help! I don't understand this!

Method: player:setAnnounceValue(...)
Counterpart: getPlayerAnnounceValue

Required Arguments

  • thePlayer: The player whos announce value you wish to change.
  • key: The key which the value will be stored at.
  • value: The value you wish to store.


Returns true if the value was set succesfully, false otherwise.


Click to collapse [-]

This small example adds a command that allows you to set your own "score" value.

function setScore ( playerSource, cmdName, scoreValue )
    if ( scoreValue ) then
        setPlayerAnnounceValue ( playerSource, "score", scoreValue )

addCommandHandler ( "score", setScore )

See Also