- -- 3 Weapons
- -- By «§H»Kennan{Leader}
- -- Xfire : kenster789
- -- This script will force the 3 desired guns into their hands.
- -- Version 2.00 (1.00 not released)
- -- If you find any bugs or have any request or questions just message me over xfire.
- -- I have tested this script with the 3 weapons that are alreay in it.
- -- This script will destory what ever weapons they spawn with. So if you want them to spawn with the regular Pistol and Assault plus another gun, you will need to place
- -- the Pistol and Assault rifle tags in two of the slots below.
- -- If you want the order that a player is holding them to be different just move the tags around in the 3 slots until they are in the desired holding order.
- --------------------------------IMPORTANT-----------------------------------------
- -- THE STARTING EQUIPEMENT FOR THE GAMETYPE HAS TO BE CUSTOME OR IT WILL NOT WORK.
- ----------------------------------------------------------------------------------
- ----------------------------------------------------------------------------------
- first_weapon_tag = "weapons\\assault rifle\\assault rifle" -- First Weapon Tag
- second_weapon_tag = "weapons\\pistol\\pistol" -- Second Weapon Tag
- third_weapon_tag = "weapons\\shotgun\\shotgun" -- Third Weapon Tag
- -- The below is a list of the useable guns.
- -- Assault rifle, "weapons\\assault rifle\\assault rifle"
- -- The Oddball Skull, "weapons\\ball\\ball"
- -- Flag, "weapons\\flag\\flag"
- -- Flame Thrower, "weapons\\flamethrower\\flamethrower"
- -- Needler, "weapons\\needler\\mp_needler"
- -- Pistol, "weapons\\pistol\\pistol"
- -- Plasma Pistol, "weapons\\plasma pistol\\plasma pistol"
- -- Plasma Rifle, "weapons\\plasma rifle\\plasma rifle"
- -- Fuel rod, "weapons\\plasma_cannon\\plasma_cannon"
- -- Rocket Launcher, "weapons\\rocket launcher\\rocket launcher"
- -- Shot Gun, "weapons\\shotgun\\shotgun"
- -- Sniper Rifle, "weapons\\sniper rifle\\sniper rifle"
- function GetRequiredVersion()
- return 10057
- 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(team)
- return team
- end
- function OnPlayerJoin(player, team)
- end
- function OnPlayerLeave(player, team)
- end
- function OnPlayerKill(killer, victim, mode)
- end
- function OnKillMultiplier(player, multiplier)
- end
- function OnPlayerSpawn(player, m_objectId)
- end
- function OnPlayerSpawnEnd(player, m_objectId)
- for i = 0,3 do -- Loop through the player's weapons.
- local m_object = getobject(m_objectId) -- Get the object ID.
- if m_object then -- Ff the object(the player) is alive.
- local weapID = readdword(m_object, 0x2F8 + i*4) -- Get the ID of the weapons.
- local weap = getobject(weapID) -- Get the weapons Object ID.
- if weap then -- If the weapon exist.
- destroyobject(weapID) -- Destroy it.
- end
- end
- end
- local first_gun = createobject("weap", first_weapon_tag, 0, 1, false, 0, 0, 0) -- Create the first weapon.
- local second_gun = createobject("weap", second_weapon_tag, 0, 1, false, 0, 0, 0) -- Create the second weapon.
- local third_gun = createobject("weap", third_weapon_tag, 0, 1, false, 0, 0, 0) -- Create the third weapon.
- assignweapon(player, first_gun) -- Force the first_gun into their hands.
- assignweapon(player, second_gun) -- Force the second_gun into their hands.
- assignweapon(player, third_gun) -- Force the third_gun into their hands.
- end
- function OnTeamChange(relevant, player, cur_team, dest_team)
- return 1
- end
- function OnObjectCreation(m_objId, player, tagName)
- end
- function OnObjectInteraction(player, m_objId, tagType, tagName)
- return 1
- end
- function OnWeaponAssignment(player, m_objId, slot, tagName)
- return 0
- end
- function OnWeaponReload(player, m_weapId)
- return 1
- end
- function OnDamageLookup(receiver, causer, tagData, tagName)
- end
- function OnVehicleEntry(relevant, player, m_vehicleId, tagName, seat)
- return 1
- end
- function OnVehicleEject(player, forced)
- return 1
- end
- function OnClientUpdate(player, m_objId)
- end
Recent Pastes