ResendPlayerModInfo: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(→‎Syntax: OOP syntax added)
(Remove obsolete Requirements section)
 
(One intermediate revision by one other user not shown)
Line 26: Line 26:
)
)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.1.1-9.03451|n/a|}}


==See Also==
==See Also==
{{Player functions}}
{{Player functions|server}}

Latest revision as of 15:36, 7 November 2024

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

Syntax

bool resendPlayerModInfo ( player thePlayer )

OOP Syntax Help! I don't understand this!

Method: player:resendModInfo(...)


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
)

See Also