Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ ### Rage Quit v1 ###]]--
- --[[ ### by H® Shaft for Phasor v2 ###]]--
- -- if a player quits the game within <expire_time> of being killed, it announces: "<PlayerName> RAGE QUIT!"
- -- edit --
- expire_time = 10 --| time (in seconds) if player leaves before this time expires it will announce they rage quit
- -- don't edit --
- rage_quitter = {}
- game_started = false
- function GetRequiredVersion()
- return 200
- end
- function OnScriptLoad(process, game, persistent)
- for i=0,15 do
- if getplayer(i) then
- rage_quitter[i] = false
- end
- end
- game_started = false
- end
- function OnNewGame(map)
- for i=0,15 do
- if getplayer(i) then
- rage_quitter[i] = false
- end
- end
- game_started = true
- end
- function OnPlayerJoin(player)
- if getplayer(player) then
- rage_quitter[player] = false
- end
- end
- function OnPlayerLeave(player)
- if getplayer(player) then
- if game_started then
- if rage_quitter[player] then
- for i=0,15 do
- if getplayer(i) then
- privatesay(i, getname(player) .. " RAGE QUIT!")
- end
- end
- end
- end
- rage_quitter[player] = {}
- end
- end
- function OnPlayerKill(killer, victim, mode)
- if getplayer(victim) then
- if mode == 4 and game_started then
- rage_quitter[victim] = true
- raging = registertimer(1000 * expire_time, "Rage_Quit", victim)
- end
- end
- end
- function Rage_Quit(id, count, player)
- if getplayer(player) then
- rage_quitter[player] = false
- end
- return false
- end
- function OnGameEnd(stage)
- if stage == 1 then
- game_started = false
- if raging then
- removetimer(raging)
- raging = 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
Advertisement