Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: AelitePrime & H® Shaft
- --Script Name: Multi-Team Vehicle Script
- --Website: http://phasorscripts.wordpress.com/
- --Xfire: eliteprime14789x
- --Version: 1.1 12/31/2013
- --Edited to fix/enable mtv on spawn/join
- -- Suggestion: use with my Taxi script: http://pastebin.com/EYqiMWU4 and/or use with my Pistol Entry script: http://pastebin.com/aDizsamK
- function GetRequiredVersion()
- return 200
- end
- function OnScriptLoad(process, game, persistent)
- if game == "PC" or game == true then
- gametype_base = 0x671340
- else
- gametype_base = 0x5F5498
- end
- if readbyte(gametype_base + 0x34) == 1 then
- compatible = false
- log_msg(4, "Multi-Team-Vehicles script is NOT compatible with TEAM games, FFA Only!")
- log_msg(1, "Multi-Team-Vehicles script is NOT compatible with TEAM games, FFA Only!")
- else
- compatible = true
- end
- end
- function OnPlayerSpawn(player, m_objectId)
- if compatible then writebyte(getplayer(player) + 0x20, 0) end
- end
- function OnPlayerJoin(player)
- if getplayer(player) then
- welcomemsg = registertimer(6000, "timedwelcome", player)
- if compatible then writebyte(getplayer(player) + 0x20, 0) end
- end
- end
- function timedwelcome(id, count, player)
- if count == 1 then
- if getplayer(player) then
- privatesay(player, "Multi-Team-Vehicles! You can enter the enemy hog!")
- end
- end
- return false
- end
- function OnDamageLookup(receiver_id, causer_id, tagid)
- if compatible then
- if causer_id and receiver_id then
- local c_player = objectidtoplayer(causer_id)
- local r_player = objectidtoplayer(receiver_id)
- if r_player and c_player and c_player ~= r_player then
- local count = r_player
- while(getteam(c_player) == count) do
- count = count + 1
- end
- writebyte(getplayer(r_player) + 0x20, count)
- mtv = registertimer(100, "multiteamtimer", r_player)
- end
- end
- end
- end
- function multiteamtimer(id, count, player)
- if compatible then
- writebyte(getplayer(player) + 0x20, 0)
- end
- return false
- end
- function OnGameEnd(stage)
- if stage == 1 then
- if notice then
- removetimer(notice)
- notice = nil
- end
- if welcomemsg then
- removetimer(welcomemsg)
- welcomemsg = nil
- end
- if mtv then
- removetimer(mtv)
- mtv = nil
- 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