onPlayerIslandChange
From Liberty Unleashed Wiki
This is called when a player moves from an island to another.
Syntax
function onPlayerIslandChange( Player player, int old_island, int new_island )
Arguments
- player - The pointer of the player
- old_island - The island they left
- new_island - The island they just entered
Returns
This event does not handle return values.
Example
This will tell the player which island they just entered.
function GetIslandName( i ) { switch ( i ) { case 1: return "Portland"; case 2: return "Staunton Island"; case 3: return "Shoreside Vale"; } return "Unknown"; } function onPlayerIslandChange( player, old, new ) { MessagePlayer( "Your have entered " + GetIslandName( new ), player ); return 1; }
Notes
The function MessagePlayer was used in this example. More info about it can be found in the corresponding page.
Related Events
- onPlayerAction
- onPlayerArmourChange
- onPlayerCashChange
- onPlayerChat
- onPlayerCommand
- onPlayerConnect
- onPlayerDeath
- onPlayerFall
- onPlayerHealthChange
- onPlayerIslandChange
- onPlayerJoin
- onPlayerKeyStateChange
- onPlayerKill
- onPlayerPart
- onPlayerScoreChange
- onPlayerSkinChange
- onPlayerSpawn
- onPlayerUpdate
- onPlayerTeamChange
- onPlayerUseDetonator
- onPlayerVirtualWorldChange
- onPlayerWeaponChange