Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Super Jump for Phasor v2+
- -- by H® Shaft
- -- Script allows use of dev-mode super-jump in multiplayer.
- -- fall damage is off to prevent player damage when landing
- -- players sometimes de-sync, (can't see themselves jumping high), it resolves itself shortly, or upon death
- function GetRequiredVersion()
- return 200
- end
- function OnScriptLoad(process, game, persistent)
- GAME = game
- GetGameAddresses(GAME)
- game_started = false
- for i=0,15 do
- if getplayer(i) then
- if isalive(i) then
- writedword(getplayer(i) + 0xF0, 0)
- writedword(getplayer(i) + 0x164, 0)
- end
- end
- end
- end
- function OnClientUpdate(player)
- if getplayer(player) then
- if isalive(player) then
- writedword(getplayer(player) + 0xF0, 0)
- writedword(getplayer(player) + 0x164, 0)
- end
- end
- end
- function OnPlayerSpawn(player, m_objectId)
- if isalive(player) then
- writedword(getplayer(player) + 0xF0, 0)
- writedword(getplayer(player) + 0x164, 0)
- end
- end
- function OnNewGame(map)
- game_started = true
- GetGameAddresses(GAME)
- end
- function OnPlayerJoin(player)
- if getplayer(player) then
- if game_started then
- svcmd("set cheat_super_jump true")
- svcmd("set cheat_jetpack true")
- end
- end
- end
- function OnGameEnd(stage)
- if stage == 1 then
- game_started = false
- if not game_started then
- svcmd("set cheat_super_jump false")
- svcmd("set cheat_jetpack false")
- end
- end
- end
- function isalive(player)
- local m_objectId = getplayerobjectid(player)
- if m_objectId then
- local m_object = getobject(m_objectId)
- if m_object then
- return true
- else
- return false
- end
- end
- end
- function GetGameAddresses(GAME)
- if (GAME == nil) then return end
- if GAME == "PC" then
- map_name = readstring(0x698F21)
- gametype_base = 0x671340
- devmode_patch1 = 0x4A4DBF
- devmode_patch2 = 0x4A4E7F
- else
- map_name = readstring(0x61D151)
- gametype_base = 0x5F5498
- devmode_patch1 = 0x47DF0C
- devmode_patch2 = 0x47DFBC
- end
- writeword(devmode_patch1, 0x9090)
- writeword(devmode_patch2, 0x9090)
- end
- map_reset = false
- function ScriptLoad()
- if map_reset == true then
- map_reset = false
- game_started = true
- for i=0,15 do
- if getplayer(i) then
- if isalive(i) then
- svcmd("set cheat_super_jump true")
- svcmd("set cheat_jetpack true")
- end
- end
- end
- end
- end
- function OnServerCommand(player, command)
- local allow = nil
- local t = tokenizecmdstring(command)
- local count = #t
- if t[1] == "sv_script_reload" then
- map_reset = true
- ScriptLoad()
- allow = true
- end
- return allow
- end
- -- Created by H® Shaft
- -- Visit http://halorace.org/forum/index.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement