ResendPlayerModInfo: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 8: | Line 8: | ||
bool resendPlayerModInfo ( player thePlayer ) | bool resendPlayerModInfo ( player thePlayer ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[player]]:resendModInfo||}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''thePlayer''': A [[player]] object referencing the specified player | *'''thePlayer''': A [[player]] object referencing the specified player | ||
Line 15: | Line 15: | ||
Returns ''true'' if the mod info will be resent, ''false'' otherwise. | Returns ''true'' if the mod info will be resent, ''false'' otherwise. | ||
== | ==Example== | ||
This example shows how to resend each players mod info during [[onResourceStart]] | |||
<syntaxhighlight lang="lua"> | |||
addEventHandler( "onResourceStart", resourceRoot, | |||
function() | |||
for _,player in ipairs( getElementsByType("player") ) do | |||
resendPlayerModInfo( player ) | |||
end | |||
end | |||
) | |||
</syntaxhighlight> | |||
==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
- getAlivePlayers
- getDeadPlayers
- getPlayerACInfo
- getPlayerAnnounceValue
- getPlayerCount
- getPlayerIdleTime
- getPlayerIP
- getPlayerVersion
- getRandomPlayer
- isPlayerMuted
- redirectPlayer
- resendPlayerACInfo
- resendPlayerModInfo
- setPlayerAnnounceValue
- setPlayerMuted
- setPlayerScriptDebugLevel
- setPlayerTeam
- setPlayerVoiceBroadcastTo
- setPlayerVoiceIgnoreFrom
- setPlayerWantedLevel
- spawnPlayer
- takePlayerScreenShot
- Shared
- getPlayerTeam
- getPlayerBlurLevel
- setPlayerBlurLevel
- getPlayerSerial
- forcePlayerMap
- getPlayerScriptDebugLevel
- getPlayerFromName
- getPlayerMoney
- getPlayerName
- getPlayerNametagColor
- getPlayerNametagText
- getPlayerPing
- getPlayerWantedLevel
- givePlayerMoney
- isPlayerMapForced
- isPlayerNametagShowing
- setPlayerHudComponentVisible
- setPlayerMoney
- setPlayerNametagColor
- setPlayerNametagShowing
- setPlayerNametagText
- takePlayerMoney
- countPlayersInTeam
- getPlayersInTeam
- isVoiceEnabled
- setControlState
- getControlState