- crouch = {}
- tbag = {}
- 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(cur_team)
- return cur_team
- end
- function OnPlayerJoin(player, team)
- tbag[player] = {}
- end
- function OnPlayerLeave(player, team)
- end
- function OnPlayerKill(killer, victim, mode)
- tbag[victim].name = nil
- tbag[victim].count = 0
- if mode == 4 then
- tbag[killer].count = 0
- tbag[killer].name = getname(victim)
- end
- end
- function OnKillMultiplier(player, multiplier)
- end
- function OnPlayerSpawn(player, m_objectId)
- end
- function OnPlayerSpawnEnd(player, m_objectId)
- end
- function OnTeamChange(relevant, player, team, dest_team)
- return 1
- end
- function OnClientUpdate(player, m_objectId)
- local m_player = getplayer(player)
- local id = resolveplayer(player)
- local m_object = getobject(m_objectId)
- local m_playerObjId = getplayerobjectid(player)
- if getobject(readdword(m_object, 0x11C)) == nil then
- local obj_crouch = readbyte(m_object, 0x2A0)
- local cph = readbit(m_object, 0x208, 7)
- if obj_crouch ~= 3 and cph == 1 and crouch[id] == nil then
- crouch[id] = OnPlayerCrouch(player, m_playerObjId)
- elseif cph == 0 then
- crouch[id] = nil
- end
- end
- if crouch[id] == 0 then
- writebit(m_object, 0x208, 7, 0)
- end
- if m_player == nil then
- return
- end
- end
- function OnObjectInteraction(player, m_ObjectId, tagType, tagName)
- return 1
- end
- function OnWeaponReload(player, weapon)
- return 1
- end
- function OnVehicleEntry(relevant, player, vehicleId, vehicle_tag, seat)
- return 1
- end
- function OnVehicleEject(player, forceEject)
- return 1
- end
- function OnDamageLookup(receiving_obj, causing_obj, tagdata, tagname)
- end
- function OnWeaponAssignment(player, object, count, tag)
- end
- function OnObjectCreation(m_objectId, player_owner, tag)
- end
- function OnPlayerCrouch(player, m_objectId)
- if tbag[player].name ~= nil then
- if (tbag[player].count == nil) or then
- tbag[player].count = 0
- end
- tbag[player].count = tbag[player].count + 1
- if tbag[player].count == 4 then
- tbag[player].count = 0
- say(getname(player).. " Is t-bagging " .. tbag[player].name "corps")
- tbag[player].name = nil
- end
- end
- return 1
- end
Recent Pastes