Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Name
- function GetRequiredVersion()
- return 10058
- end
- function OnScriptLoad(process)
- end
- function OnScriptUnload()
- end
- function OnNewGame(map)
- end
- function OnGameEnd(mode)
- end
- function OnServerChat(player, chattype, message)
- return 1
- end
- function OnServerCommand(player, command)
- return 1
- end
- function OnTeamDecision(team)
- return team
- end
- function OnPlayerJoin(player, team)
- end
- function OnPlayerLeave(player, team)
- end
- function OnPlayerKill(killer, victim, mode)
- end
- function OnKillMultiplier(player, multiplier)
- end
- function OnPlayerSpawn(player, m_objId)
- end
- function OnPlayerSpawnEnd(player, m_objId)
- end
- function OnTeamChange(relevant, player, cur_team, dest_team)
- return 1
- end
- function OnObjectCreation(m_objId, player, tagName)
- end
- function OnObjectInteraction(player, m_objId, tagType, tagName)
- return 1
- end
- function OnWeaponAssignment(player, m_objId, slot, tagName)
- return 0
- end
- function OnWeaponReload(player, m_weapId)
- return 1
- end
- function OnDamageLookup(receiver, causer, tagData, tagName)
- end
- function OnVehicleEntry(relevant, player, m_vehicleId, tagName, seat)
- return 1
- end
- function OnVehicleEject(player, forced)
- return 1
- end
- coords = {}
- function OnClientUpdate(player, m_objId)
- local x, y, z = getobjectcoords(m_objId)
- local hash = gethash(player)
- local m_object = getobject(m_objId)
- if m_object then
- coords[hash] = coords[hash] or {}
- local xdiff = (coords[hash][1] or x) - x
- local ydiff = (coords[hash][2] or y) - y
- local zdiff = (coords[hash][3] or z) - z
- local dist = math.sqrt(xdiff ^ 2 + ydiff ^ 2 + zdiff ^ 2)
- if dist > 1 then
- OnPlayerTeleport(player, m_objId, x, y, z)
- end
- else
- coords[hash] = {}
- end
- end
- -- Called when a player's coordinates change drastically within a small period of time; passes the player, m_objId and x, y, and z coordinates the player was teleported to.
- function OnPlayerTeleport(player, m_objId, x, y, z)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement