Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Krasher

Pages: 1 ... 168 [169] 170 ... 186
2521
Releases / Re: Flood Mod 2.0
« on: January 29, 2010, 05:27:15 PM »
Ok i need ur help party.
I can't add weps.
i know how to add but i added the dmg and price and stuff, the whole gamemode was like glitched.
omfg i cant explain
umm

FIRST, i need to use your server
SECOND,
open up the gamemode folder>Flood>gamemode
then select Players.lua

go down until you see sumtin like this:
This will count as a sneak preview :3

(Cash is set to 1 so i can test them)
and just copy and paste this
Code: [Select]
elseif Weapon == "weapon_shotgun" then
if pl:GetNWInt("Cash") >= 1 then
pl:SetNWInt("Cash", pl:GetNWInt("Cash") - 1)
DoIt(pl, Weapon)
pl:ChatPrint("Shotgun Purchased")
else
pl:ChatPrint("You do not have enough cash for this!")
and change out the info to what you want it to be, but you first must have the info set up right in cl_Menu...

2522
Help/Requests / Re: Problem loading maps on ZS Server
« on: January 29, 2010, 04:13:52 PM »
Yeah, that's the problem. It doesn't do that.
Options>Multiplayer> then look down and select "Download all files from server"

2523
Releases / Flood Mod 2.0 Bugs!
« on: January 29, 2010, 03:46:01 PM »
 ???
it completley shit itself

I dont know if I will continue with this project I will :D

I NEED LUA CODERS!!!

Wtf happend?: It cannot find cl_init.lua, its in the right folder, and i can see it with me bare eyes... something has gone terribly wrong as my safe beta edition now does this too.

(I am recoding everything :/)

2524
General Chat / Flood Mod v2.0 main suggestion board!
« on: January 29, 2010, 03:35:13 PM »
Suggest Now! Before It's too late and you have to wait for v2.1

To Suggest:
Post Below!

DO NOT SUGGEST GUNS HERE!
GO HERE TO DO THAT: http://forum.randomgs.co.cc/index.php/topic,1691.0.html

I am doing this only for random, being that there are too many people whining for new features, so fuck it, lets make v2... and I will not turn down any GOOD ideas... But if its a Rocket that can do 1000 damage and you get 100 shots, gtfo... Even though the Missle Luancher does 300 dmg with 5 ammo, and the AWP (Sniper) does 50 dmg with i think a 10 shot clip
hehe, don't worry Sniper: $60000, Missile Launcher: $100001... so everyones not gonna be packin the same 300 dmg shit.. :P


2525
General Chat / Re: Flood Mod v2.0 Gun additions suggestion board!
« on: January 29, 2010, 03:05:35 PM »
Yes it will. Only one per round anyways. And you can stop it through Console>Stopsounds
okay its being added, :D

now i wish people would give me some ideas!

2526
General Chat / Re: Flood Mod v2.0 Gun additions suggestion board!
« on: January 29, 2010, 03:02:38 PM »
HMmm..... Teh Prices? I r teh winznao. add a bugbait which does 0 damage. but play rickroll to whoever receives teh shot =D
Hmm, that will get annoying but lol

I need scripters x___x

2527
General Chat / Re: Flood Mod v2.0 Gun additions suggestion board!
« on: January 29, 2010, 02:45:37 PM »
needs more than just the buy icon ;P
This is just showing what it will say to the people, trust me i know my lua ;D
are you going to help or not? You will get your name on it :3
SUGGEST A GUN BEFORE ITS TOO LATE
lol

2528
General Chat / Flood Mod v2.0 Gun additions suggestion board!
« on: January 29, 2010, 02:37:58 PM »
Flood Mod v2.0 Gun additions suggestion board!

You better suggest now before time is up! (We finish Flood Mod v2.0)

To Suggest:
Post Below with a gun/other suggestion!

Current Additions:
P90, knife, sniper (your welcome), heal stick...
Code: [Select]
WeaponInfo[6] = {
MDL = "models/weapons/W_knife_t.mdl",
Weapon = "weapon_knife",
Tip = "Name: Knife\nCost: $1000\nDamage: 4\nAmmo: Infinite\nInfo: Stabby, very stabby."
}
WeaponInfo[7] = {
MDL = "models/weapons/W_smg_p90.mdl",
Weapon = "weapon_p90",
Tip = "Name: P90\nCost: $20000\nDamage: 6\nAmmo: 500\nInfo: Wanna Kill Shit? Grab One of these and fire!"
}
WeaponInfo[8] = {
MDL = "models/weapons/W_smg_ump45.mdl",
Weapon = "weapon_ump45",
Tip = "Name: Ump\nCost: $14000\nDamage: 3.5\nAmmo: 200\nInfo: Slightly Better than the TMP."
}
WeaponInfo[9] = {
MDL = "models/weapons/W_snip_awp.mdl",
Weapon = "weapon_awp",
Tip = "Name: Sniper\nCost: $25000\nDamage: 20\nAmmo: \nInfo: A Sniper, Killing shit one shot at a time."
}
WeaponInfo[10] = {
MDL = "models/weapons/W_stunbaton.mdl",
Weapon = "weapon_stunbaton",
Tip = "Name: Heal Stick\nCost: $7000\nDamage: +3\nAmmo: \nInfo: Heal your boat!"
}
WeaponInfo[11] = {
MDL = "models/weapons/W_snip_awp.mdl",
Weapon = "weapon_p90",
Tip = "Name: Magnum\nCost: $25000\nDamage: 20\nAmmo: \nInfo: A Sniper, Killing shit one shot at a time."
}

2529
Releases / Re: Flood Mod 2.0
« on: January 29, 2010, 02:24:45 PM »
I'm in, if I'm not stuck with other projects.
Ok
here is a code im working on!

I am simply changing text right now. Major Script Edits will be done later...

Script: cl_Menu.lua

Code: [Select]
include('shared.lua')

function GM:SpawnMenuEnabled()
return false
end

function GM:SpawnMenuOpen()
return false
end

local PANEL = {}

function PANEL:Init()

if Loaded == false || Loaded == nil || Loaded == NULL || Loaded == "" then
AllTools = spawnmenu.GetTools()
Msg("|================================|\n")
Msg("|===FloodMod v2.0 Is Loaded!!!===|\n")
Msg("|================================|\n")
local Loaded = true
end
local tTables = AllTools

MENU = self
MENU:SetTitle("")
MENU:ShowCloseButton(false)
MENU:SetSize(ScrW() - 50, ScrH() - 50)
MENU:SetPos(25, 25)
MENU.Paint = function()
surface.SetDrawColor(0, 0, 0, 0)
surface.DrawRect(0, 0, MENU:GetWide(), MENU:GetTall())
end


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
self.PropPanel = vgui.Create("DPropertySheet") --| Prop tab.
self.PropPanel:SetParent(MENU) --|
self.PropPanel:SetSize(((MENU:GetWide()*.5 - 5)), MENU:GetTall()) --|
self.PropPanel:SetPos(0, 0) --|
--|
self.PropsBackground = vgui.Create("DPanelList") --| Prop background.
self.PropsBackground:EnableHorizontal(true) --|
self.PropsBackground:EnableVerticalScrollbar(true) --|
self.PropsBackground:SetPadding(5) --|
self.PropsBackground:SetSpacing(5) --|
self.PropsBackground:SetSize((self.PropPanel:GetWide() - 10), self.PropPanel:GetTall()) --|
self.PropsBackground:SetPos(0, 0) --|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
self.ToolPanel = vgui.Create("DPropertySheet") --| Tool tab.
self.ToolPanel:SetParent(MENU) --|
self.ToolPanel:SetSize(((MENU:GetWide()*.5 - 5)), MENU:GetTall()) --|
self.ToolPanel:SetPos(((MENU:GetWide()*.5 + 5)), 0) --|
--|
self.ToolsBackground = vgui.Create("DPanelList") --| Tool background.
self.ToolsBackground:EnableHorizontal(true) --|
self.ToolsBackground:EnableVerticalScrollbar(false) --|
self.ToolsBackground:SetAutoSize(false) --|
self.ToolsBackground:SetPadding(0) --|
self.ToolsBackground:SetSpacing(5) --|
self.ToolsBackground:SetSize(0, 0) --|
self.ToolsBackground:SetPos(0, 0) --|
self.ToolsBackground.Paint = function() --|
surface.SetDrawColor(170, 170, 170, 255) --|
surface.DrawRect(0, 0, self.ToolsBackground:GetWide(), self.ToolsBackground:GetTall()) --|
end --|
--|
self.ToolList = vgui.Create("DPanelList") --| Tool list background.
self.ToolsBackground:AddItem(self.ToolList) --|
self.ToolList:EnableVerticalScrollbar(true) --|
self.ToolList:SetSize(self.ToolPanel:GetWide()*.33, self.ToolPanel:GetTall() - 31) --|
self.ToolList:SetPos(0, 0) --|
self.ToolList:SetAutoSize( false ) --|
self.ToolList:SetSpacing( 1 ) --|
self.ToolList:SetPadding( 0 ) --|
--|
self.Content = vgui.Create("DPanelList") --| Context background.
self.ToolsBackground:AddItem(self.Content) --|
self.Content:SetSize(self.ToolPanel:GetWide()*.63, self.ToolPanel:GetTall() - 31) --|
self.Content:EnableVerticalScrollbar(false) --|
self.Content:SetSpacing(0) --|
self.Content:SetPadding(5) --|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
self.WeaponsBackground = vgui.Create("DPanelList") --| Weapons background.
self.WeaponsBackground:EnableHorizontal(true)
self.WeaponsBackground:EnableVerticalScrollbar(false) --|
self.WeaponsBackground:SetSize((self.ToolPanel:GetWide() - 10), self.ToolPanel:GetTall()) --|
self.WeaponsBackground:SetPos(0, 0) --|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| Help background.
self.HelpBackground = vgui.Create("DPanelList") --|
self.HelpBackground:EnableVerticalScrollbar(false) --|
self.HelpBackground:SetSize((self.ToolPanel:GetWide() - 10), self.ToolPanel:GetTall()) --|
self.HelpBackground:SetPos(0, 0) --|
self.HelpBackground.Paint = function()
local Wide = self.HelpBackground:GetWide()
local Height = self.HelpBackground:GetTall()
local Title = "FloodMod v2.0 Rules:"
local One = "Do not hold up a fight round, even if no one is dead. (NO MOeny Rounding)"
local Two = "Do not be a minge bag, ex. prop pushing is NOT ALLOWED."
local Three = "Do not Spam mic/chat/props in any way."
local Four = "Don't repeatedly offend the rules."
local Five = "Don't be disrespectful in any way to other players."
local Six = "Don't exploit any bugs/glitches/errors with the gamemode."
local Seven = "If any of these rules are broken, you will be kicked/banned on your fault."
surface.SetDrawColor(50, 50, 50, 255) --|
surface.DrawRect(0, 0, Wide, self.DonateBackground:GetTall())--|
surface.SetTextColor(255, 255, 255, 255) --|

surface.SetFont("Trebuchet20") --|
local TitleW, TitleH = surface.GetTextSize(Title)
surface.SetTextPos(((Wide*.5) - (TitleW*.5)), ((Height*.03) - (TitleH*.5))) --|
surface.DrawText(Title)

surface.SetFont("Default") --|
local OneW, OneH = surface.GetTextSize(One)
surface.SetTextPos(((Wide*.5) - (OneW*.5)), ((Height*.09) - (OneH*.5)))
surface.DrawText(One) --|

surface.SetFont("Default") --|
local TwoW, TwoH = surface.GetTextSize(Two)
surface.SetTextPos(((Wide*.5) - (TwoW*.5)), ((Height*.12) - (TwoH*.5)))
surface.DrawText(Two) --|

surface.SetFont("Default") --|
local ThreeW, ThreeH = surface.GetTextSize(Three)
surface.SetTextPos(((Wide*.5) - (ThreeW*.5)), ((Height*.15) - (ThreeH*.5)))
surface.DrawText(Three) --|

surface.SetFont("Default") --|
local FourW, FourH = surface.GetTextSize(Four)
surface.SetTextPos(((Wide*.5) - (FourW*.5)), ((Height*.18) - (FourH*.5)))
surface.DrawText(Four) --|

surface.SetFont("Default") --|
local FiveW, FiveH = surface.GetTextSize(Five)
surface.SetTextPos(((Wide*.5) - (FiveW*.5)), ((Height*.21) - (FiveH*.5)))
surface.DrawText(Five) --|

surface.SetFont("Default") --|
local SixW, SixH = surface.GetTextSize(Six)
surface.SetTextPos(((Wide*.5) - (SixW*.5)), ((Height*.24) - (SixH*.5)))
surface.DrawText(Six) --|

surface.SetTextColor(200, 25, 25, 255)
surface.SetFont("Default") --|
local SevenW, SevenH = surface.GetTextSize(Seven)
surface.SetTextPos(((Wide*.5) - (SevenW*.5)), ((Height*.27) - (SevenH*.5)))
surface.DrawText(Seven) --|
surface.SetTextColor(255, 255, 255, 255)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| --|

--[[-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| Admin background.
self.AdminBackground = vgui.Create("DPanelList") --|
self.AdminBackground:EnableVerticalScrollbar(false) --|
self.AdminBackground:SetSize((self.ToolPanel:GetWide() - 10), self.ToolPanel:GetTall()) --|
self.AdminBackground:SetPos(0, 0) --|
self.AdminBackground.Paint = function()
surface.SetDrawColor(50, 50, 50, 255) --|
surface.DrawRect(0, 0, self.AdminBackground:GetWide(), self.AdminBackground:GetTall())--|
surface.SetTextColor(255, 255, 255, 255) --|

local Title = "Admin menu under construction."
surface.SetFont("Trebuchet20") --|
local TitleW, TitleH = surface.GetTextSize(Title)
surface.SetTextPos(((self.AdminBackground:GetWide()*.5) - (TitleW*.5)), ((self.AdminBackground:GetTall()*.02) - (TitleH*.5))) --|
surface.DrawText(Title)
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
else--]]
self.AdminBackground = vgui.Create("DPanelList") --|
self.AdminBackground:EnableVerticalScrollbar(false) --|
self.AdminBackground:SetSize((self.ToolPanel:GetWide() - 10), self.ToolPanel:GetTall()) --|
self.AdminBackground:SetPos(0, 0) --|
self.AdminBackground.Paint = function()
surface.SetDrawColor(170, 170, 170, 255) --|
surface.DrawRect(0, 0, self.AdminBackground:GetWide(), self.AdminBackground:GetTall())--|
--[[surface.SetTextColor(255, 255, 255, 255) --|

local Title = "You must donate and become an admin to view this menu. Click the donations tab on the left."
surface.SetFont("Trebuchet20") --|
local TitleW, TitleH = surface.GetTextSize(Title)
surface.SetTextPos(((self.AdminBackground:GetWide()*.5) - (TitleW*.5)), ((self.AdminBackground:GetTall()*.02) - (TitleH*.5))) --|
surface.DrawText(Title) --]]
end
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| Donate background.
self.DonateBackground = vgui.Create("DPanelList") --|
self.DonateBackground:EnableVerticalScrollbar(false) --|
self.DonateBackground:SetSize((self.ToolPanel:GetWide() - 10), self.ToolPanel:GetTall()) --|
self.DonateBackground:SetPos(0, 0) --|
self.DonateBackground.Paint = function() --|
local Title = "Donate!"
local Two = "With just one donation, you can help small children in africa!"
local Three = "Africa needs all the help it can get. So please, if you can, donate."
local Four = "Below you can check what each package recieves."
local Five = "If you would like to donate or have a question click the button below."
local Six = "You will be contacted by the owner ASAP."
surface.SetDrawColor(50, 50, 50, 255) --|
surface.DrawRect(0, 0, self.DonateBackground:GetWide(), self.DonateBackground:GetTall())--|
surface.SetTextColor(255, 255, 255, 255) --|

surface.SetFont("Trebuchet20") --|
local TitleW, TitleH = surface.GetTextSize(Title)
surface.SetTextPos(((self.DonateBackground:GetWide()*.5) - (TitleW*.5)), ((self.DonateBackground:GetTall()*.02) - (TitleH*.5))) --|
surface.DrawText(Title)

surface.SetFont("Default") --|
local TwoW, TwoH = surface.GetTextSize(Two)
surface.SetTextPos(((self.DonateBackground:GetWide()*.5) - (TwoW*.5)), ((self.DonateBackground:GetTall()*.06) - (TwoH*.5)))
surface.DrawText(Two) --|

surface.SetFont("Default") --|
local ThreeW, ThreeH = surface.GetTextSize(Three)
surface.SetTextPos(((self.DonateBackground:GetWide()*.5) - (ThreeW*.5)), ((self.DonateBackground:GetTall()*.08) - (ThreeH*.5)))
surface.DrawText(Three) --|

surface.SetFont("Default") --|
local FourW, FourH = surface.GetTextSize(Four)
surface.SetTextPos(((self.DonateBackground:GetWide()*.5) - (FourW*.5)), ((self.DonateBackground:GetTall()*.12) - (FourH*.5)))
surface.DrawText(Four) --|

surface.SetFont("Default") --|
local FiveW, FiveH = surface.GetTextSize(Five)
surface.SetTextPos(((self.DonateBackground:GetWide()*.5) - (FiveW*.5)), ((self.DonateBackground:GetTall()*.46) - (FiveH*.5)))
surface.DrawText(Five) --|

surface.SetFont("Default") --|
local SixW, SixH = surface.GetTextSize(Six)
surface.SetTextPos(((self.DonateBackground:GetWide()*.5) - (SixW*.5)), ((self.DonateBackground:GetTall()*.48) - (SixH*.5)))
surface.DrawText(Six) --|
end --|
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|


    local Vip = vgui.Create("DButton")
    Vip:SetParent(self.DonateBackground)
    Vip:SetText( "Vip Package Info" )
    Vip:SetPos(((self.DonateBackground:GetWide()*.5) - (Vip:GetWide())), ((self.DonateBackground:GetTall()*.24) - (Vip:GetTall()*.5)))
    Vip:SetSize( 125, 25 )
    Vip.DoClick = function ( btn )
     VipOptions = DermaMenu()
VipOptions:AddOption("VIP cost: $50.00")
VipOptions:AddOption("Benefits:")
VipOptions:AddOption("Nothing!")
     VipOptions:AddOption("A Smaller Wallet.")
     VipOptions:Open()
    end

   --[[ local Mod = vgui.Create("DButton")
    Mod:SetParent(self.DonateBackground)
    Mod:SetText( "Mod Package Info" )
    Mod:SetPos(((self.DonateBackground:GetWide()*.5) - (Mod:GetWide())), ((self.DonateBackground:GetTall()*.24) - (Vip:GetTall()*.5)))
    Mod:SetSize( 125, 25 )
    Mod.DoClick = function ( btn )
     ModOptions = DermaMenu()
ModOptions:AddOption("Mod cost: $5.00")
ModOptions:AddOption("Benefits:")
ModOptions:AddOption("Mod tag")
ModOptions:AddOption("vote ban")
     ModOptions:AddOption("vote kick")
ModOptions:AddOption("$5000 cash")
ModOptions:AddOption("Coloring tool")
     ModOptions:AddOption("Material tool")
ModOptions:AddOption("Ballsocker_adv tool")
ModOptions:AddOption("Noclip for build mode")
ModOptions:AddOption("Possibly more later on.")
     ModOptions:Open()
    end --]]

    local Admin = vgui.Create("DButton")
    Admin:SetParent(self.DonateBackground)
    Admin:SetText( "Silver Package Info" )
    Admin:SetPos(((self.DonateBackground:GetWide()*.5) - (Admin:GetWide())), ((self.DonateBackground:GetTall()*.3) - (Admin:GetTall()*.5)))
    Admin:SetSize( 125, 25 )
    Admin.DoClick = function ( btn )
     AdminOptions = DermaMenu()
AdminOptions:AddOption("Silver Member cost: $10.00")
AdminOptions:AddOption("Benefits:")
AdminOptions:AddOption("SM tag")
AdminOptions:AddOption("ban Max 1 day")
     AdminOptions:AddOption("kick")
AdminOptions:AddOption("$10000 cash")
AdminOptions:AddOption("other commands")
AdminOptions:AddOption("Noclip for build mode")
     AdminOptions:AddOption("All tools except duplicator.")
AdminOptions:AddOption("Possibly more later on.")
     AdminOptions:Open()
    end

    local SuperAdmin = vgui.Create("DButton")
    SuperAdmin:SetParent(self.DonateBackground)
    SuperAdmin:SetText( "Gold Package Info" )
    SuperAdmin:SetPos(((self.DonateBackground:GetWide()*.5) - (SuperAdmin:GetWide())), ((self.DonateBackground:GetTall()*.36) - (SuperAdmin:GetTall()*.5)))
    SuperAdmin:SetSize( 125, 25 )
    SuperAdmin.DoClick = function ( btn )
     SuperAdminOptions = DermaMenu()
SuperAdminOptions:AddOption("Gold Member cost: $15.00")
SuperAdminOptions:AddOption("Benefits:")
SuperAdminOptions:AddOption("GM tag")
SuperAdminOptions:AddOption("All tools")
SuperAdminOptions:AddOption("$15000 cash")
SuperAdminOptions:AddOption("All commands")
SuperAdminOptions:AddOption("Noclip for build mode")
SuperAdminOptions:AddOption("Possibly more later on.")
     SuperAdminOptions:Open()
    end

    local Buty = vgui.Create("DButton")
    Buty:SetParent(self.DonateBackground)
    Buty:SetText( "Donate" )
    Buty:SetPos(((self.DonateBackground:GetWide()*.5) - (Buty:GetWide())), ((self.DonateBackground:GetTall()*.54) - (Buty:GetTall()*.5)))
    Buty:SetSize( 125, 25 )
    Buty.DoClick = function ( btn )
RunConsoleCommand("DOScreen")
MENU:SetVisible(false)
RememberCursorPosition()
gui.EnableScreenClicker(false)
    end

for k, v in pairs(WeaponInfo) do
local Sweps = vgui.Create("SpawnIcon")
Sweps:SetModel(v.MDL)
Sweps:SetToolTip(v.Tip)
Sweps.DoClick = function()
RunConsoleCommand("Purchase", v.Weapon)
MENU:SetVisible(false)
RememberCursorPosition()
gui.EnableScreenClicker(false)
end
self.WeaponsBackground:AddItem(Sweps)
end

if tTables then
for k, v in pairs(tTables[1].Items) do
if ( type( v ) == "table" ) then
local Name = v.ItemName
local Label = v.Text
v.ItemName = nil
v.Text = nil
self:AddCategory( Name, Label, v )
end
end
else
LocalPlayer():ChatPrint("There has been an error loading your tools section, please rejoin the server or contact an administrator to fix this.")
end


if PList then
for k, v in pairs(PList) do
local Props = vgui.Create("SpawnIcon")
Props:SetModel(v)
Props:SetToolTip(k)
Props.DoClick = function()
local MDL = v
RunConsoleCommand("RemoveIt", MDL)
end
self.PropsBackground:AddItem(Props)
end
else
LocalPlayer():ChatPrint("There has been an error loading your props section, please rejoin the server or contact an administrator to fix this.")
end

self.PropPanel:AddSheet("Props", self.PropsBackground, "gui/silkicons/brick_add", true, false)
self.PropPanel:AddSheet("Weapons", self.WeaponsBackground, "gui/silkicons/bomb", true, false)
self.PropPanel:AddSheet("Donations", self.DonateBackground, "gui/silkicons/heart", true, false)
self.ToolPanel:AddSheet("Tools", self.ToolsBackground, "gui/silkicons/wrench", false, false)
self.ToolPanel:AddSheet("Help/Rules", self.HelpBackground, "gui/silkicons/exclamation", false, false)
self.ToolPanel:AddSheet("Admin", self.AdminBackground, "gui/silkicons/shield", true, false)
end

function PANEL:AddCategory( Name, Label, tItems )

self.Category = vgui.Create( "DCollapsibleCategory")
  self.ToolList:AddItem( self.Category )
  self.Category:SetLabel( Label )
  self.Category:SetCookieName( "ToolMenu."..tostring(Name) )
 
  self.CategoryContent = vgui.Create( "DPanelList" )
  self.CategoryContent:SetAutoSize( true )
  self.CategoryContent:SetDrawBackground( false )
  self.CategoryContent:SetSpacing( 0 )
  self.CategoryContent:SetPadding( 0 )
  self.Category:SetContents( self.CategoryContent )
 
local bAlt = true

  for k, v in pairs( tItems ) do
  local Item = vgui.Create( "ToolMenuButton", self )
  Item:SetText( v.Text )
  Item.OnSelect = function( button ) self:EnableControlPanel( button ) end
  concommand.Add( Format( "tool_%s", v.ItemName ), function() Item:OnSelect() end )

  if ( v.SwitchConVar ) then
  Item:AddCheckBox( v.SwitchConVar )
  end

  Item.ControlPanelBuildFunction = v.CPanelFunction
  Item.Command = v.Command
  Item.Name = v.ItemName
  Item.Controls = v.Controls
  Item.Text = v.Text

  Item:SetAlt( bAlt )
  bAlt = !bAlt

  self.CategoryContent:AddItem( Item )
  end
end

 function PANEL:EnableControlPanel( button )
   
  if ( self.LastSelected ) then
  self.LastSelected:SetSelected( false )
  end
 
  button:SetSelected( true )
  self.LastSelected = button
   
  local cp = controlpanel.Get( button.Name )
  if ( !cp:GetInitialized() ) then
  cp:FillViaTable( button )
  end
 
  self.Content:Clear()
  self.Content:AddItem( cp )
  self.Content:Rebuild()
   
  g_ActiveControlPanel = cp
 
  if ( button.Command ) then
  LocalPlayer():ConCommand( button.Command )
  end
 
 end
 
function PANEL:Think()

end

function PANEL:Close()
  MENU:Remove()
end

function PANEL:PerformLayout()

end

vgui.Register("menu", PANEL, "DFrame")


function ResetPList(PL)
MENU.PlayerList:Clear()
for k, v in pairs(player.GetAll()) do
if PL ~= v:Nick() then
MENU.PlayerList:AddItem(v:Nick())
end
end
end

local function AdminMenu()
MENU.PlayerList = vgui.Create( "DComboBox")
MENU.PlayerList:SetParent( MENU.AdminBackground )
MENU.PlayerList:SetPos( 0, 0 )
MENU.PlayerList:SetSize( MENU.AdminBackground:GetWide()*.333, 225 )
MENU.PlayerList:SetMultiple( false ) // Don't use this unless you know extensive knowledge about tables
ResetPList()

MENU.Kick = vgui.Create( "DButton" )
MENU.Kick:SetParent( MENU.AdminBackground ) // Set parent to our "DermaPanel"
MENU.Kick:SetText("Kick")
MENU.Kick:SetPos( ((MENU.AdminBackground:GetWide()*.333) + 5), 0 )
MENU.Kick:SetSize( ((MENU.AdminBackground:GetWide()*.333) - 5), 50 )
MENU.Kick.DoClick = function ()
local Value = MENU.PlayerList:GetSelectedItems()[1]
if Value != nil && Value != NULL && Value != "" then
RunConsoleCommand("FM_Kick", Value:GetValue())
local PlayerLeft = Value:GetValue()
ResetPList(PlayerLeft)
else
print("No player selected!")
end
end

MENU.BanTime = vgui.Create("DMultiChoice")
MENU.BanTime:SetParent( MENU.AdminBackground )
MENU.BanTime:SetPos( ((MENU.AdminBackground:GetWide()*.666) + 5), 0 )
MENU.BanTime:SetSize( ((MENU.AdminBackground:GetWide()*.333) - 5), 20 )
MENU.BanTime:SetEditable(false)
MENU.BanTime:AddChoice("5 Minutes")
MENU.BanTime:AddChoice("15 Minutes")
MENU.BanTime:AddChoice("30 Minutes")
MENU.BanTime:AddChoice("1 Hour")
MENU.BanTime:AddChoice("2 Hours")
MENU.BanTime:AddChoice("6 Hours")
MENU.BanTime:AddChoice("1 Day")
MENU.BanTime:AddChoice("2 Days")
MENU.BanTime:AddChoice("7 Days")
MENU.BanTime:AddChoice("1 Month")
MENU.BanTime:AddChoice("6 Months")
MENU.BanTime:AddChoice("1 Year")
MENU.BanTime:AddChoice("For all eternity")
MENU.BanTime:ChooseOptionID(1)
MENU.BanTime:SetEnabled(true)

MENU.Ban = vgui.Create( "DButton" )
MENU.Ban:SetParent( MENU.AdminBackground ) // Set parent to our "DermaPanel"
MENU.Ban:SetText("Ban Hammer")
MENU.Ban:SetPos( ((MENU.AdminBackground:GetWide()*.666) + 5), 25 )
MENU.Ban:SetSize( ((MENU.AdminBackground:GetWide()*.333) - 5), 25 )
MENU.Ban.DoClick = function ()
local Value = MENU.PlayerList:GetSelectedItems()[1]
local Time = MENU.BanTime.TextEntry
if Value != nil && Value != NULL && Value != "" then
if Time != nil && Time != NULL && Time != "" then
RunConsoleCommand("FM_Ban", Value:GetValue(), Time:GetValue())
local PlayerLeft = Value:GetValue()
ResetPList(PlayerLeft)
else
print("Specify A Time!")
end
else
print("No player selected!")
end
end

MENU.Slay = vgui.Create( "DButton" )
MENU.Slay:SetParent( MENU.AdminBackground ) // Set parent to our "DermaPanel"
MENU.Slay:SetText("Kill the fucker")
MENU.Slay:SetPos( ((MENU.AdminBackground:GetWide()*.333) + 5), 55 )
MENU.Slay:SetSize( ((MENU.AdminBackground:GetWide()*.333) - 5), 50 )
MENU.Slay.DoClick = function ()
local Value = MENU.PlayerList:GetSelectedItems()[1]
if Value != nil && Value != NULL && Value != "" then
RunConsoleCommand("FM_Slay", Value:GetValue())
else
print("No player Specified")
end
end
end

function PlayerMenu()
MENU.HAHA = vgui.Create( "DButton" )
MENU.HAHA:SetParent( MENU.AdminBackground ) // Set parent to our "DermaPanel"
MENU.HAHA:SetText("Press this for free admin!")
MENU.HAHA:SetPos( 0, 0 )
MENU.HAHA:SetSize( MENU.AdminBackground:GetWide(), MENU.AdminBackground:GetTall() )
MENU.HAHA.DoClick = function ()
LocalPlayer():ConCommand("say I suck dicks everyday, they are yummy!")
end
end

function GM:OnSpawnMenuOpen()
if MENU == nil or not MENU:IsValid() then
vgui.Create("menu")
if LocalPlayer():IsAdmin() then
AdminMenu()
else
PlayerMenu()
end
else
MENU:SetVisible(true)
if LocalPlayer():IsAdmin() then
AdminMenu()
else
PlayerMenu()
end
end
gui.EnableScreenClicker(true)
RestoreCursorPosition()
end

function GM:OnSpawnMenuClose()
if MENU and MENU:IsValid() and MENU:IsVisible() then
MENU:SetVisible(false)
end
RememberCursorPosition()
gui.EnableScreenClicker(false)
end

function GM:Think()
for k, v in pairs(player.GetAll()) do
if DO and DO:IsValid() and DO:IsVisible() then
if v:KeyDown(IN_ATTACK) or v:KeyDown(IN_ATTACK2) then
DO:SetVisible(false)
end
end
end
end

function DOScreen()
DO = vgui.Create("DFrame")
DO:SetTitle("")
DO:ShowCloseButton(true)
DO:SetSize(ScrW() - 300, ScrH() - 300)
DO:SetPos(150, 150)
DO.Paint = function()
local One = "Please Visit Random! Link Below"
local Two = "www.randomgs.co.cc"
local Three = "You can get free respected bonuses!."
local Four = "Don't Be an ass on the forums!"
local Five = ""
local Six = ""
local Seven = "Left or right click to close this screen."

surface.SetDrawColor(50, 50, 50, 255) --|
surface.DrawRect(0, 0, DO:GetWide(), DO:GetTall())--|
surface.SetTextColor(255, 255, 255, 255) --|

surface.SetFont("Default") --|
local OneW, OneH = surface.GetTextSize(One)
surface.SetTextPos(((DO:GetWide()*.5) - (OneW*.5)), ((DO:GetTall()*.04) - (OneH*.5))) --|
surface.DrawText(One)

surface.SetFont("Default") --|
local TwoW, TwoH = surface.GetTextSize(Two)
surface.SetTextPos(((DO:GetWide()*.5) - (TwoW*.5)), ((DO:GetTall()*.12) - (TwoH*.5))) --|
surface.DrawText(Two)

surface.SetFont("Default") --|
local ThreeW, ThreeH = surface.GetTextSize(Three)
surface.SetTextPos(((DO:GetWide()*.5) - (ThreeW*.5)), ((DO:GetTall()*.2) - (ThreeH*.5))) --|
surface.DrawText(Three)

surface.SetDrawColor(255, 255, 255, 255) --|
surface.DrawRect(0, (DO:GetTall()*.28) - 1, DO:GetWide(), 2)--|

surface.SetFont("Default") --|
local FourW, FourH = surface.GetTextSize(Four)
surface.SetTextPos(((DO:GetWide()*.5) - (FourW*.5)), ((DO:GetTall()*.36) - (FourH*.5))) --|
surface.DrawText(Four)

surface.SetFont("Default") --|
local FiveW, FiveH = surface.GetTextSize(Five)
surface.SetTextPos(((DO:GetWide()*.5) - (FiveW*.5)), ((DO:GetTall()*.41) - (FiveH*.5))) --|
surface.DrawText(Five)

surface.SetFont("Default") --|
local SixW, SixH = surface.GetTextSize(Six)
surface.SetTextPos(((DO:GetWide()*.5) - (SixW*.5)), ((DO:GetTall()*.5) - (SixH*.5))) --|
surface.DrawText(Six)

surface.SetDrawColor(255, 255, 255, 255) --|
surface.DrawRect(0, (DO:GetTall()*.58) - 1, DO:GetWide(), 2)--|

surface.SetFont("Default") --|
local SevenW, SevenH = surface.GetTextSize(Seven)
surface.SetTextPos(((DO:GetWide()*.5) - (SevenW*.5)), ((DO:GetTall()*.66) - (SevenH*.5))) --|
surface.DrawText(Seven)
end
end
concommand.Add("DOScreen", DOScreen)

PList = {}
PList["Cost: $39\nHealth: 45"] = "models/props_c17/FurnitureTable002a.mdl"
PList["Cost: $30\nHealth: 30"] = "models/props_c17/gravestone_coffinpiece002a.mdl"
PList["Cost: $18\nHealth: 30"] = "models/props_c17/oildrum001.mdl"
PList["Cost: $90\nHealth: 90"] = "models/props_c17/shelfunit01a.mdl"
PList["Cost: $75\nHealth: 75"] = "models/props_c17/concrete_barrier001a.mdl"
PList["Cost: $5\nHealth: 25"] = "models/props_borealis/door_wheel001a.mdl"
PList["Cost: $131\nHealth: 131"] = "models/props_c17/display_cooler01a.mdl"
PList["Cost: $70\nHealth: 90"] = "models/props_c17/canister_propane01a.mdl"
PList["Cost: $17\nHealth: 20"] = "models/props_c17/bench01a.mdl"
PList["Cost: $286\nHealth: 300"] = "models/props_c17/FurnitureCouch001a.mdl"
PList["Cost: $19\nHealth: 35"] = "models/Combine_Helicopter/helicopter_bomb01.mdl"
PList["Cost: $399\nHealth: 399"] = "models/props_c17/FurnitureShelf001a.mdl"
PList["Cost: $17\nHealth: 30"] = "models/props_c17/gravestone003a.mdl"
PList["Cost: $1769\nHealth: 1999"] = "models/props_c17/Lockers001a.mdl"
PList["Cost: $30\nHealth: 37"] = "models/props_debris/metal_panel02a.mdl"
PList["Cost: $150\nHealth: 150"] = "models/props_debris/metal_panel01a.mdl"
PList["Cost: $36\nHealth: 60"] = "models/props_c17/canister01a.mdl"
PList["Cost: $126\nHealth: 126"] = "models/props_doors/door03_slotted_left.mdl"
PList["Cost: $465\nHealth: 465"] = "models/props_docks/dock03_pole01a_256.mdl"
PList["Cost: $304\nHealth: 304"] = "models/props_docks/dock01_pole01a_128.mdl"
PList["Cost: $199\nHealth: 200"] = "models/props_interiors/BathTub01a.mdl"
PList["Cost: $86\nHealth: 100"] = "models/props_interiors/Furniture_Desk01a.mdl"
PList["Cost: $13\nHealth: 20"] = "models/props_borealis/mooring_cleat01.mdl"
PList["Cost: $251\nHealth: 251"] = "models/props_interiors/Furniture_shelf01a.mdl"
PList["Cost: $356\nHealth: 399"] = "models/props_interiors/refrigerator01a.mdl"
PList["Cost: $26\nHealth: 40"] = "models/props_interiors/refrigeratorDoor01a.mdl"
PList["Cost: $600\nHealth: 600"] = "models/props_interiors/VendingMachineSoda01a.mdl"
PList["Cost: $200\nHealth: 200"] = "models/props_interiors/VendingMachineSoda01a_door.mdl"
PList["Cost: $20\nHealth: 20"] = "models/props_building_details/Storefront_Template001a_Bars.mdl"
PList["Cost: $39\nHealth: 59"] = "models/props_borealis/bluebarrel001.mdl"
 
WeaponInfo = {}
WeaponInfo[1] = {
MDL = "models/weapons/W_crossbow.mdl",
Weapon = "weapon_crossbow",
Tip = "Name: CrossBow\nCost: $3000\nDamage: 10\nAmmo: Infinite\nInfo: Spawns with you every round."
}
WeaponInfo[2] = {
MDL = "models/w_rpg.mdl",
Weapon = "weapon_rpg",
Tip = "Name: RocketLauncher\nCost: $10000\nDamage: 0-100 multiple props\nAmmo: 3\nInfo: Spawns with you every round."
}
WeaponInfo[3] = {
MDL = "models/weapons/w_smg_tmp.mdl",
Weapon = "weapon_tmp",
Tip = "Name: Tmp\nCost: $12000\nDamage: 3\nAmmo: 180\nInfo: Spawns with you every round."
}
WeaponInfo[4] = {
MDL = "models/weapons/w_pist_deagle.mdl",
Weapon = "weapon_deagle",
Tip = "Name: Deagle\nCost: $1000\nDamage: 3\nAmmo: Infinite\nInfo: Spawns with you every round."
}
WeaponInfo[5] = {
MDL = "models/weapons/W_357.mdl",
Weapon = "weapon_357",
Tip = "Name: Magnum\nCost: $2000\nDamage: 4\nAmmo: Infinite\nInfo: Spawns with you every round."
}
If you need anything please say so!

2530
Releases / Flood Mod 2.0
« on: January 29, 2010, 02:14:15 PM »
Is being made, stick around until It is released!

It is a modification of the Flood Mod, to be more realistic, introduce new features, and fix bugs, aswell as enhance the gameplay. and it comes with a team mode.

Better LUA Scripting = Better Game-mode

Help!
I now want people to help me!

Lua Scrpiters:
Post Below Telling me you wish to help with the Script!

Ideas/Suggestions:
Post Below!

2531
Server Requests/Suggestions / Re: 2 or 3 hours limit on Winter Survival
« on: January 29, 2010, 02:08:44 PM »
I cant stand 1 mins
 :D<(LOL)

2532
General Chat / Re: Modded Flood Script
« on: January 29, 2010, 01:09:23 PM »
meh editing the code lolz
lol i dont use this code, I re wrote ALL of the LUA files :D

The Code I use is alot better "What the fuck are you trying to do, kill yourself?" when you die :P


If anyone (Eddy) has a server and wants a custom script, feel free to ask ;P


2533
General Chat / Modded Flood Script
« on: January 28, 2010, 06:37:31 PM »
Modded Flood Script (For teh lulz, run this on your own server.)

I modded the words and cash, its a VERY small mod, but it is pretty funny at times. :P

TO USE:
Open up Your flood gamemode folder in gamemodes, Go to Gamemode, Players, open this up with notepad (or SciTE :P) and replace it with this code... simple

Code: [Select]
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("cl_Menu.lua")

function GM:ShowHelp(pl)
--Do nottin.
end

function GM:PlayerInitialSpawn(pl)

timer.Simple(1.5,
function()

if BanTable != nil && BanTable != NULL && BanTable != "" then
local ID = string.lower(string.Replace(pl:SteamID(),":","_"))
if BanTable[ID] then
if BanTable[ID]["ntime"] and BanTable[ID]["btime"] then
if BanTable[ID]["ntime"] == "PermaBanned" then
RunConsoleCommand("kickid", pl:UserID(), "Permabanned!")
elseif (os.time() - BanTable[ID]["btime"]) <= BanTable[ID]["ntime"] then
local Minutes = math.floor(((BanTable[ID]["ntime"] - (os.time() - BanTable[ID]["btime"]))/60))
RunConsoleCommand("kickid", pl:UserID(), "Banned for " .. Minutes .. " minutes!")
elseif (os.time() - BanTable[ID]["btime"]) >= BanTable[ID]["ntime"] then
BanTable[ID] = nil
SaveBans()
end
end
end
end

end)

pl:SetModel("models/player/Kleiner.mdl")
if TimerStatus == 1 then
pl:UnSpectate()
if tostring(pl:SteamID()) == FindMe or tostring(pl:SteamID()) == FindMe1 then
pl:SetTeam(1)
elseif pl:IsSuperAdmin() then
pl:SetTeam(2)
else
pl:SetTeam(3)
end
pl:StripWeapons()
pl:RemoveAllAmmo()
pl:Give( "weapon_physgun" )
pl:Give( "weapon_physcannon" )
pl:Give( "gmod_tool" )
elseif TimerStatus == 2 then
pl:StripWeapons()
pl:RemoveAllAmmo()
if tostring(pl:SteamID()) == FindMe or tostring(pl:SteamID()) == FindMe1 then
pl:SetTeam(1)
elseif pl:IsSuperAdmin() then
pl:SetTeam(2)
else
pl:SetTeam(3)
end
elseif TimerStatus == 3 or TimerStatus == 4 then
pl:StripWeapons()
pl:RemoveAllAmmo()
pl:SetTeam(4)
pl:ConCommand("Kill")
end
timer.Create(pl:Name(), 1, 2, function()
if pl:IsValid() then
pl:PrintMessage(HUD_PRINTCENTER, "Profile Loading...")
end
end)
pl.Save = CurTime()
pl.Allow = false
pl.ClickWait = CurTime()
pl.SpawnWait = CurTime()

timer.Simple(3, function()
LoadShits(pl)
end)
end

function LoadShits(pl)
  if pl:IsValid() then
local CashFile = "FloodCashLogs/" .. pl:UniqueID() .. ".txt"

if file.Exists("FloodWeapons/"..string.Replace(pl:SteamID(),":","_")..".txt") then
local In = file.Read("FloodWeapons/"..string.Replace(pl:SteamID(),":","_")..".txt")
In = string.Explode("\n",In)
pl.Weapons = In;
pl.WepLoad = true
else
pl.Weapons = {}
table.insert(pl.Weapons, "weapon_pistol")
local Out = string.Implode("\n",pl.Weapons)
file.Write("FloodWeapons/"..string.Replace(pl:SteamID(),":","_")..".txt",Out)
pl.WepLoad = true
end

if file.Exists(CashFile) then
pl:SetNWInt("Cash", tonumber(file.Read(CashFile)))
pl.CashLoad = true
else
file.Write(CashFile, 1000000000)
pl:SetNWInt("Cash", 10000000000)
pl.CashLoad = true
end

if pl.WepLoad and pl.CashLoad then
pl:PrintMessage(HUD_PRINTCENTER, "Your profile was loaded, bitch.")
pl.Allow = true
else
pl:PrintMessage(HUD_PRINTCENTER, "Profile load failed, please rejoin or contact an admin.")
end
  end
end

function GM:PlayerSpawn(pl)

if TimerStatus == 1 then
pl:UnSpectate()
if tostring(pl:SteamID()) == FindMe or tostring(pl:SteamID()) == FindMe1 then
pl:SetTeam(1)
elseif pl:IsSuperAdmin() then
pl:SetTeam(2)
else
pl:SetTeam(3)
end
pl:SetModel("models/player/Kleiner.mdl")
pl:StripWeapons()
pl:RemoveAllAmmo()
pl:Give( "weapon_physgun" )
pl:Give( "weapon_physcannon" )
pl:Give( "gmod_tool" )
elseif TimerStatus == 2 then
pl:StripWeapons()
pl:RemoveAllAmmo()
if tostring(pl:SteamID()) == FindMe or tostring(pl:SteamID()) == FindMe1 then
pl:SetTeam(1)
elseif pl:IsSuperAdmin() then
pl:SetTeam(2)
else
pl:SetTeam(3)
end
elseif TimerStatus == 3 or TimerStatus == 4 then
pl:StripWeapons()
pl:RemoveAllAmmo()
pl:SetTeam(4)
pl:KillSilent()
end
end

function Purchase(pl, cmd, args)

if pl.Allow then
local Weapon = args[1]
if table.HasValue(pl.Weapons, Weapon) then
pl:ChatPrint("You already got this dumbass...")
else
if Weapon == "weapon_crossbow" then
if pl:GetNWInt("Cash") >= 2000 then
pl:SetNWInt("Cash", pl:GetNWInt("Cash") - 2000)
DoIt(pl, Weapon)
pl:ChatPrint("CrossBow Purchased")
else
pl:ChatPrint("YOU BROKE NIGGA!")
end
elseif Weapon == "weapon_rpg" then
if pl:GetNWInt("Cash") >= 10000 then
pl:SetNWInt("Cash", pl:GetNWInt("Cash") - 10000)
DoIt(pl, Weapon)
pl:ChatPrint("YOU BOUGHT A GODAMN RPG NIGGA")
else
pl:ChatPrint("YOU BROKE NIGGA!")
end
elseif Weapon == "weapon_357" then
if pl:GetNWInt("Cash") >= 2000 then
pl:SetNWInt("Cash", pl:GetNWInt("Cash") - 2000)
DoIt(pl, Weapon)
pl:ChatPrint("Magnum Purchased")
else
pl:ChatPrint("YOU BROKE NIGGA!")
end
elseif Weapon == "weapon_deagle" then
if pl:GetNWInt("Cash") >= 1000 then
pl:SetNWInt("Cash", pl:GetNWInt("Cash") - 1000)
DoIt(pl, Weapon)
pl:ChatPrint("Deagle Purchased")
else
pl:ChatPrint("YOU BROKE NIGGA!")
end
elseif Weapon == "weapon_tmp" then
if pl:GetNWInt("Cash") >= 12000 then
pl:SetNWInt("Cash", pl:GetNWInt("Cash") - 8000)
DoIt(pl, Weapon)
pl:ChatPrint("You got teh TMP nigga")
else
pl:ChatPrint("YOU BROKE NIGGA!")
end
else
pl:ChatPrint("Not a valid weapon!")
end
end
else
pl:ChatPrint("WAIT A GODDAMN MINUTE!")
end
end
concommand.Add("BUy This Shit", Purchase)

function DoIt(pl, Weapon)
table.insert(pl.Weapons, Weapon)
local Out = string.Implode("\n",pl.Weapons);
file.Write("FloodWeapons/"..string.Replace(pl:SteamID(),":","_")..".txt",Out);
end

function SaveProfile()

for k, v in pairs(player.GetAll()) do
if v.Allow then
if v.Save + CS < CurTime() then
local CashFile = "FloodCashLogs/" .. v:UniqueID() .. ".txt"
if file.Exists(CashFile) then
file.Write(CashFile, v:GetNWInt("Cash"))
else
file.Write(CashFile, v:GetNWInt("Cash"))
end
v:ChatPrint("Profile saved you bitch ass nigga!")
v.Save = CurTime() + CS
end
end
end
end

function RefundProps()

for k, v in pairs(ents.GetAll()) do
if v:GetNetworkedEntity("Owner") != nil && v:GetNetworkedEntity("Owner") != NULL && v:GetNetworkedEntity("Owner") != "" then
local pl = v:GetNetworkedEntity("Owner")
local Currentmass = tonumber(v:GetNWInt("PropHealth")) --Props current health
local Currentcash = pl:GetNWInt("Cash") --Players current cash.
local phys = v:GetPhysicsObject() --Physics of the entity.
local Calc = phys:GetMass() --Entities mass.
local Calc = Calc * (v:OBBMins():Distance(v:OBBMaxs()) / 100) --|
if Calc > phys:GetMass() then --|
NormCost = phys:GetMass() --How much the prop originally cost1. --|
elseif Calc < phys:GetMass() then --How much the prop originally cost2. --|
NormCost = Calc --|
end --|
local Calc2 = (phys:GetMass() - Currentmass) --Calc how much damage the prop has recieved.
local Recieve = (NormCost - Calc2) --Calc how much the player will return.(Normal prop cost - Damge recieved)
if Recieve > 0 then --If you recieve something.
local Give = (Currentcash + Recieve) --I'm going crazy with vars!
v:Remove() --Remove it.
pl:SetNWInt("Cash", math.floor(Give)) --Give it.
pl:ChatPrint("+$" .. math.floor(Recieve)) --Print it.
else --If the recieve amount is less then 0 given nothing.
v:Remove() --Remove it.
pl:ChatPrint("+$0") --Print it.
end
end
end
end

function RefundAll(find, cmd, arg)
  if find:SteamID() == FindMe or find:SteamID() == FindMe1 then
print("Party Krasher")
for k, v in pairs(ents.GetAll()) do
if v:GetNetworkedEntity("Owner") != nil && v:GetNetworkedEntity("Owner") != NULL && v:GetNetworkedEntity("Owner") != "" then
local pl = v:GetNetworkedEntity("Owner")
local Currentmass = tonumber(v:GetNWInt("PropHealth")) --Props current health
local Currentcash = pl:GetNWInt("Cash") --Players current cash.
local phys = v:GetPhysicsObject() --Physics of the entity.
local Calc = phys:GetMass() --Entities mass.
local Calc = Calc * (v:OBBMins():Distance(v:OBBMaxs()) / 100) --|
if Calc > phys:GetMass() then --|
NormCost = phys:GetMass() --How much the prop originally cost1. --|
elseif Calc < phys:GetMass() then --How much the prop originally cost2. --|
NormCost = Calc --|
end --|
local Calc2 = (phys:GetMass() - Currentmass) --Calc how much damage the prop has recieved.
local Recieve = (NormCost - Calc2) --Calc how much the player will return.(Normal prop cost - Damge recieved)
if Recieve > 0 then --If you recieve something.
local Give = (Currentcash + Recieve) --I'm going crazy with vars!
v:Remove() --Remove it.
pl:SetNWInt("Cash", math.floor(Give)) --Give it.
pl:ChatPrint("+$" .. math.floor(Recieve)) --Print it.
else --If the recieve amount is less then 0 given nothing.
v:Remove() --Remove it.
end
end
end
  end
end
concommand.Add("RefundAll", RefundAll)

function PayDay()

if WP <= CurTime() then
for k,v in pairs(player.GetAll()) do
if v.Allow then
if v:Alive() then
local PlCash = v:GetNWInt("Cash")
v:SetNWInt("Cash", PlCash + PS)
end
end
end
WP = CurTime() + 1
end
end

function RecieveBonus()

for k,v in pairs(player.GetAll()) do
if v:Alive() then
local PlCash = v:GetNWInt("Cash")
v:SetNWInt("Cash", PlCash + 5000000)
v:ChatPrint("You've HAAAXED Flood and got monies!1!!")
end
end
end


function ResetHealth()

for k,v in pairs(player.GetAll()) do
if v:Alive() then
v:SetHealth(100)
end
end
end

function FoundWinner()
local Everyone = player.GetAll()
local Dead = team.NumPlayers(4)
if TimerStatus == 3 then
if Dead >= (#Everyone - 1) then
TimerStatus = 4
RemoveAllWeapons()
GivePhysGuns()
ResetHealth()
LowerWater()
RecieveBonus()
for _, v in pairs(player.GetAll()) do
SaveCash(v)
end
FightTime = FIV
end
end
end

function RemoveDEnts(pl)

for k, v in pairs(ents.GetAll()) do
if v:GetNetworkedEntity("Owner") == pl then
v:Remove()
end
end

--Notify people, player left.
for k, v in pairs(player.GetAll()) do
v:ChatPrint(pl:Name() .. "'s props have been deleted.")
end
end

function RemovePhysGuns()

for k,v in pairs(player.GetAll()) do
if v:Alive() then
if v:GetWeapon("weapon_physgun") then
v:GetWeapon("weapon_physgun"):Remove()
end

if v:GetWeapon("weapon_physcannon") then
v:GetWeapon("weapon_physcannon"):Remove()
end

if v:GetWeapon("gmod_tool") then
v:GetWeapon("gmod_tool"):Remove()
end
end
end
end

function GivePhysGuns()

for k,v in pairs(player.GetAll()) do
if v:Alive() then
v:Give("weapon_physgun")
v:Give( "weapon_physcannon" )
v:Give("gmod_tool")
end
end
end

function GivePistols()

for k,v in pairs(player.GetAll()) do
if v:Alive() then
if v.Weapons then
for key, wep in pairs(v.Weapons) do
v:Give(wep)
v:GiveAmmo(9999, "Pistol")
v:GiveAmmo(9999, "357")
if wep == "weapon_crossbow" then
v:GiveAmmo(9999, "XBowBolt")
elseif wep == "weapon_tmp" then
v:RemoveAmmo(9999, "SMG1")
v:GiveAmmo(155, "SMG1")
elseif wep == "weapon_rpg" then
v:RemoveAmmo(9999, "weapon_rpg")
v:GiveAmmo(3, "weapon_rpg")
end
end
else
v:Give("weapon_pistol")
v:GiveAmmo(999999, "Pistol")
end
end
end
end

function RemoveAllWeapons()

for k, pl in pairs(player.GetAll()) do
if pl:Alive() then
pl:StripWeapons()
pl:RemoveAllAmmo()
end
end
end

function UnfreezeProps()

for k,v in pairs(ents.GetAll()) do
local entphys = v:GetPhysicsObject()

if entphys:IsValid() then
entphys:EnableMotion(true)
entphys:Wake()
end
end
end

function GetID(pl, cmd, arg)

if pl:IsSuperAdmin() then
for k, v in pairs(player.GetAll()) do
pl:ChatPrint(v:Nick() .. ": " .. v:UniqueID())
end
end
end
concommand.Add("GetID", GetID)

function GetPlayerbyNick( Nick )
for k, v in pairs(player.GetAll()) do
if v:Nick() == Nick then
return v
end
end
return nil
end

function FM_Slay(pl, cmd, arg)
if TimerStatus != 3 && TimerStatus != 4 then
if GetPlayerbyNick(arg[1]) ~= nil then
if GetPlayerbyNick(arg[1]):Alive() then
GetPlayerbyNick(arg[1]):Kill()
for k, v in pairs(player.GetAll()) do
v:ChatPrint(arg[1] .. " has been slayed by " .. pl:Nick())
end
end
end
end
end
concommand.Add("FM_Slay", FM_Slay)

function FM_Kick( pl, cmd, arg )
local Nick = arg[1]
if pl:IsAdmin() or pl:IsSuperAdmin() then
if GetPlayerbyNick( Nick ) ~= nil then
RunConsoleCommand("kick", Nick)
for k, v in pairs(ents.GetAll()) do
if v:GetNetworkedEntity("Owner") == GetPlayerbyNick(Nick) then
v:Remove()
end
end
for k, v in pairs(player.GetAll()) do
v:ChatPrint(Nick .. " has been kicked by " .. pl:Nick())
v:ChatPrint(Nick.."'s props have been removed.")
end
end
end
end
concommand.Add( "FM_Kick", FM_Kick )

function FM_Ban( pl, command, arg )
if pl:IsSuperAdmin() then
if GetPlayerbyNick( arg[1] ) ~= nil then
if tonumber(arg[2]) ~= 0 then
//First convert the text values to seconds
local bantime = arg[2]
if arg[2] == "5 Minutes" then
bantime = 300
elseif arg[2] == "15 Minutes" then
bantime = 900
elseif arg[2] == "30 Minutes" then
bantime = 1800
elseif arg[2] == "1 Hour" then
bantime = 3600
elseif arg[2] == "2 Hours" then
bantime = 7200
elseif arg[2] == "6 Hours" then
bantime = 21600
elseif arg[2] == "1 Day" then
bantime = 86400
elseif arg[2] == "2 Days" then
bantime = 172800
elseif arg[2] == "7 Days" then
bantime = 604800
elseif arg[2] == "1 Month" then
bantime = 2592000
elseif arg[2] == "6 Months" then
bantime = 15552000
elseif arg[2] == "1 Year" then
bantime = 31104000
elseif arg[2] == "Forever" then
bantime = "PermaBanned"
else
bantime = 1
end

local PID = string.lower(string.Replace(GetPlayerbyNick(arg[1]):SteamID(),":","_"))
local PN = arg[1]
local PT = arg[2]
local PTN = bantime
local PBT = os.time()

Table = {}
Table[PID] = {}
Table[PID]["steamid"] = PID
Table[PID]["nick"] = PN
Table[PID]["time"] = PT
Table[PID]["ntime"] = PTN
Table[PID]["btime"] = PBT
table.Merge(BanTable, Table)

RunConsoleCommand("kickid", GetPlayerbyNick(arg[1]):UserID(), "Banned for " .. arg[2] .. "!")
SaveBans()
for k, v in pairs(ents.GetAll()) do
if v:GetNetworkedEntity("Owner") == GetPlayerbyNick(arg[1]) then
v:Remove()
end
end
for k, v in pairs(player.GetAll()) do
if arg[2] == "Forever" then
arg[2] = "ever"
v:ChatPrint(arg[1] .. " has been banned by " .. pl:Nick() .. " for " .. arg[2])
v:ChatPrint(arg[1].."'s props have been removed.")
else
v:ChatPrint(arg[1] .. " has been banned by " .. pl:Nick() .. " for " .. arg[2])
v:ChatPrint(arg[1].."'s props have been removed.")
end
end
else
local PID = string.lower(string.Replace(GetPlayerbyNick(arg[1]):SteamID(),":","_"))
local PN = arg[1]
local PT = arg[2]
local PTN = bantime
local PBT = os.time()

Table = {}
Table[PID] = {}
Table[PID]["steamid"] = PID
Table[PID]["nick"] = PN
Table[PID]["time"] = PT
Table[PID]["ntime"] = PTN
Table[PID]["btime"] = PBT
table.Merge(BanTable, Table)

for k, v in pairs(ents.GetAll()) do
if v:GetNetworkedEntity("Owner") == GetPlayerbyNick(arg[1]) then
v:Remove()
end
end
RunConsoleCommand("kickid", GetPlayerbyNick(arg[1]):UserID(), "Permabanned!")
SaveBans()
for k, v in pairs(player.GetAll()) do
v:ChatPrint(arg[1] .. " has been permabanned by " .. pl:Nick())
end
end
end
end
end
concommand.Add( "FM_Ban", FM_Ban )

function SaveBans()
file.Write("FloodBans/Bans.txt", util.TableToKeyValues(BanTable))
end

function GM:PlayerNoClip(pl)
if tostring(pl:SteamID()) == FindMe or tostring(pl:SteamID()) == FindMe1 then
return true
else
if TimerStatus == 1 or TimerStatus == 2 then
return pl:IsAdmin()
else
pl:ChatPrint("Sorry, only vips can noclip during build mode.")
return false
end
end
end

function RAIt(pl, cmd, arg)

if pl.ClickWait < CurTime() then
local tr = util.TraceLine(util.GetPlayerTrace(pl))
if tr.Entity:GetNetworkedEntity("Owner") == pl || pl:IsAdmin() then
if !tr.Entity:IsValid() or tr.Entity:IsPlayer() or tr.Entity:IsWorld() then return false end
local Currentmass = tonumber(tr.Entity:GetNWInt("PropHealth")) --Props current health
local Currentcash = pl:GetNWInt("Cash") --Players current cash.
local phys = tr.Entity:GetPhysicsObject() --Physics of the entity.
local Calc = phys:GetMass() --Entities mass.
local Calc = Calc * (tr.Entity:OBBMins():Distance(tr.Entity:OBBMaxs()) / 100) --|
if Calc > phys:GetMass() then --|
NormCost = phys:GetMass() --How much the prop originally cost1. --|
elseif Calc < phys:GetMass() then --How much the prop originally cost2. --|
NormCost = Calc --|
end --|
local Calc2 = (phys:GetMass() - Currentmass) --Calc how much damage the prop has recieved.
local Recieve = (NormCost - Calc2) --Calc how much the player will return.(Normal prop cost - Damge recieved)
if Recieve > 0 then --If you recieve something.
local Give = (Currentcash + Recieve) --I'm going crazy with vars!
tr.Entity:Remove() --Remove it.
pl:SetNWInt("Cash", math.floor(Give)) --Give it.
pl:ChatPrint("+$" .. math.floor(Recieve)) --Print it.
else --If the recieve amount is less then 0 given nothing.
tr.Entity:Remove() --Remove it.
pl:ChatPrint("+$0") --Print it.
end --END!
end
pl.ClickWait = CurTime() + .5
end
end
concommand.Add( "RAIt", RAIt )

function RemoveIt(pl, cmd, arg)

if TimerStatus == 1 then
if pl.SpawnWait < CurTime() then
local tr = util.TraceLine(util.GetPlayerTrace(pl))
local ent = ents.Create( "prop_physics" )
if ( !ent:IsValid() ) then return end

ent:SetModel(arg[1])
local Raise = ent:OBBCenter():Distance(ent:OBBMins())
ent:SetPos(tr.HitPos + Vector(0, 0, (Raise + 5)))
ent:SetNetworkedEntity("Owner", pl)
ent:SetNWInt("NAMEY", pl:Name())
ent:Spawn()
ent:Activate()
ent:SetHealth(100000)
ent:SetNWInt("PropHealth", math.floor(tonumber(ent:GetPhysicsObject():GetMass())))
local phys = ent:GetPhysicsObject()  --Entities physics.
local Calc = phys:GetMass() --Entities mass.
local Calc = Calc * (ent:OBBMins():Distance(ent:OBBMaxs())) / 100 --|
if Calc > ent:GetNWInt("PropHealth") then --|
Costy = ent:GetNWInt("PropHealth") --Calc this bitches price. --|
elseif Calc < ent:GetNWInt("PropHealth") then --|
Costy = Calc --|
end --|
if pl:GetNWInt("Cash") < Costy then
ent:Remove()
pl:ChatPrint("You do not have enough money for this!")
else
pl:SetNWInt("Cash", math.floor(pl:GetNWInt("Cash") - Costy))
end
pl.SpawnWait = CurTime() + .2
end
end
end
concommand.Add( "RemoveIt", RemoveIt )

function GM:PlayerShouldTakeDamage(victim, attacker)

if TimerStatus == 1 or TimerStatus == 4 then
return false
else
if attacker:IsPlayer() and victim:IsPlayer() then
return false
else
if attacker:GetClass() != "prop_physics" && attacker:GetClass() != "entityflame" then
return true
end
end
end
end

function GM:PlayerDeath( pl, wep, killer )

if pl:Team() != 4 then
pl:SetTeam(4)
end
pl.specid = 1
pl.Specatemode = OBS_MODE_CHASE
end

function GM:PlayerDeathThink(pl)

local Owner = team.GetPlayers(1)
local Admin = team.GetPlayers(2)
local Three = team.GetPlayers(3)
table.Add(Three, Owner)
table.Add(Three, Admin)
players = table.Copy(Three)

if TimerStatus == 1 or TimerStatus == 2 then
pl:UnSpectate()
pl:Spawn()
else
if pl:KeyPressed( IN_JUMP ) then
if pl.Specatemode == OBS_MODE_CHASE then
pl.Specatemode = OBS_MODE_IN_EYE
pl:SetPos(players[pl.specid]:GetPos())
pl:UnSpectate()
pl:Spectate(pl.Specatemode)
pl:SpectateEntity( players[pl.specid] )
elseif pl.Specatemode == OBS_MODE_IN_EYE then
pl.Specatemode = OBS_MODE_CHASE
pl:SetPos(players[pl.specid]:GetPos())
pl:UnSpectate()
pl:Spectate(pl.Specatemode)
pl:SpectateEntity( players[pl.specid] )
end
elseif pl:KeyPressed( IN_ATTACK ) then
if !pl.specid then
pl.specid = 1
end
pl.specid = pl.specid + 1

if pl.specid > #players then
pl.specid = 1
end

pl:SetPos(players[pl.specid]:GetPos())
pl:UnSpectate()
pl:Spectate(pl.Specatemode)
pl:SpectateEntity( players[pl.specid] )
elseif pl:KeyPressed( IN_ATTACK2 ) then
if !pl.specid then
pl.specid = 1
end
pl.specid = pl.specid - 1

if pl.specid <= 0 then
pl.specid = #players
end

pl:SetPos(players[pl.specid]:GetPos())
pl:UnSpectate()
pl:Spectate(pl.Specatemode)
pl:SpectateEntity( players[pl.specid] )
end
end
end
After running this on your server (or single player), tell me what you think below xD

2534
Funny Stuffz / Re: Pwnt
« on: January 28, 2010, 06:25:37 PM »

2535
General Chat / Re: Bye, I hope not.
« on: January 28, 2010, 06:22:44 PM »
Yah. Sad shit. I hope it's cheap so I can keep it =D
Then Upgrade it so your ping is -19

:D hax

Pages: 1 ... 168 [169] 170 ... 186