Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function teleportToMarker( thePlayer, commandName )
- if (getPedOccupiedVehicle(thePlayer)) then
- outputChatBox( "This command doesn't work while in a vehicle.", thePlayer, 255, 194, 14 )
- end
- houseID = getElementDimension(thePlayer)
- if not houseID or houseID == 0 then
- outputChatBox( "This command only works inside an interior.", thePlayer, 255, 0, 0 )
- else
- local dbid, entrance, exit, type, interiorElement = findProperty( thePlayer, houseID )
- local x, y, z = getElementPosition(thePlayer)
- local difference = exit[INTERIOR_Z] - z
- if exit and difference >= 2 then
- setPlayerInsideInterior(interiorElement, thePlayer, exit)
- exports["interior-manager"]:addInteriorLogs(dbid, commandName, thePlayer)
- outputChatBox( "Teleported to interior entrance.", thePlayer, 0, 255, 0 )
- return true
- else
- outputChatBox( "You are not bugged.", thePlayer, 255, 0, 0 )
- end
- end
- end
- addCommandHandler( "fallint", teleportToMarker )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement