OnPlayerInteractDoor
From Onset Developer Wiki
Description
Called when a player interacts with a door through pressing 'E'.
Syntax
OnPlayerInteractDoor(player, door, bWantsOpen)
Parameters
- player
The player identifier. - door
The door identifier. - bWantsOpen
true if the door is currently closed on the client and therefore wants it open and vice versa.
Example
AddEvent("OnPlayerInteractDoor", function(player, door, bWantsOpen)
--AddPlayerChat(player, "Door: "..door..", "..tostring(bWantsOpen))
-- Let the players open/close the door by default.
if IsDoorOpen(door) then
SetDoorOpen(door, false)
else
SetDoorOpen(door, true)
end
end)
See also
Player
- OnPlayerServerAuth
- OnPlayerSteamAuth
- OnPlayerDownloadFile
- OnPlayerStreamIn
- OnPlayerStreamOut
- OnPlayerPickupHit
- OnPlayerJoin
- OnPlayerQuit
- OnPlayerSpawn
- OnPlayerDeath
- OnPlayerWeaponShot
- OnPlayerDamage
- OnPlayerChat
- OnPlayerChatCommand
- OnPlayerInteractDoor
- OnPlayerChangeDimension
Vehicle
- OnPlayerEnterVehicle
- OnPlayerLeaveVehicle
- OnPlayerStateChange
- OnVehicleRespawn
- OnVehicleStreamIn
- OnVehicleStreamOut
- OnVehicleDamage
- OnVehicleChangeDimension
- OnVehicleCreated
- OnVehicleDestroyed
Game
Package
NPC
- OnNPCReachTarget
- OnNPCDamage
- OnNPCSpawn
- OnNPCDeath
- OnNPCStreamIn
- OnNPCStreamOut
- OnNPCChangeDimension
- OnNPCCreated
- OnNPCDestroyed
Object
- OnObjectStopMoving
- OnObjectChangeDimension
- OnObjectCreated
- OnObjectDestroyed
- OnObjectStreamIn
- OnObjectStreamOut