ResendPlayerModInfo

From Multi Theft Auto: Wiki
Revision as of 01:58, 27 September 2013 by Ccw (talk | contribs)
Jump to navigation Jump to search

This function will force the specified player to resend their mod info, triggering the onPlayerModInfo event again.

Syntax

bool resendPlayerModInfo ( player thePlayer )

Required Arguments

  • thePlayer: A player object referencing the specified player

Returns

Returns true if the mod info will be resent, false otherwise.

Example

This example shows how to resend each players mod info during onResourceStart

addEventHandler( "onResourceStart", resourceRoot,
    function()
        for _,player in ipairs( getElementsByType("player") ) do
            resendPlayerModInfo( player )
        end
    end
)

Requirements

Minimum server version 1.1.1-9.03451
Minimum client version n/a

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.1.1-9.03451" />

See Also