Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ ### Crouch-ActiveCamo ###]]--
- --[[ ### for Phasor v2 by H® Shaft ###]]--
- invis_time = 30 --| Time in seconds for duration of invisibility/active-camouflage
- -- don't edit --
- crouch = {}
- function GetRequiredVersion()
- return 200
- end
- function OnScriptLoad(process, game, persistent)
- end
- function OnPlayerCrouch(player)
- if getplayer(player) then
- local m_objectId = getplayerobjectid(player)
- if m_objectId then
- if readdword(getobject(m_objectId) + 0x204) ~= 0x51 then
- applycamo(player, invis_time)
- end
- end
- end
- end
- function OnClientUpdate(player)
- if getplayer(player) then
- local m_objectId = getplayerobjectid(player)
- if m_objectId then
- local obj_crouch = readbyte(getobject(m_objectId) + 0x2A0)
- local id = resolveplayer(player)
- if obj_crouch == 3 and crouch[id] == nil then
- crouch[id] = OnPlayerCrouch(player)
- elseif obj_crouch ~= 3 and crouch[id] ~= nil then
- crouch[id] = nil
- end
- end
- end
- end
- -- Created by H® Shaft thank you to Oxide, AelitePrime, Nugget & Wizard.
- -- Visit http://halorace.org/forum/index.php?topic=514.0 or
- -- Visit http://pastebin.com/u/HR_Shaft for more phasor scripts
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement