Your Ad Here

Subscribe
 Post #1
 18th July 2010 Last edited by find me; 27th July 2010 at 12:59AM..
find me's Avatar
May 2008
1,542 Posts
A much more efficient version of Flood Mod completely re-scripted.
Less lag, more functionality, more expandable, more user friendly.





This new version is similar to the old except it has a few big differences.
  • The server saves its information on a database instead of files.
  • Tools, props, and weapons can be added by simply adding a new table of information.
  • There is a new mod called 'melon mod' where dead players can spawn as melons which weigh three times as much as players. If you are a melon you can push ships closer or attempt to sink people that are still alive to speed up the game.
  • The game will wait until there are two or more players before fighting.
  • A simple prop protection has now been added to the build menu.
  • Finally everything has been optimized quite a bit and runs much better than the old version. This also allows it to be expanded on easier as in adding new features and events to the game.


Requirements:
  • Once you have these two things, you need to go into the file init.lua in the gamemode folder and fill in the top part with your new database information.
After you do all that you will be able to run a server.


Adding new tools/props/weapons:
To add any of these things you need to first go into shared.lua
Tools:

--Add your tool name to the AllowedTools table.--
AllowedTools = {
"MyNewTool"
}
 
--Add a new table with your tools information.--
ToolList["Constraints"][9] = {
Controls = "ToolNameHere",
ItemName = "ToolNameHere",
Command = "gmod_tool ToolNameHere",
Text = "#ToolNameHere"
}
 


Props:

--Add a new table with your props information.--
PropList[31] = {
Cost = 9000,
Health = 9000,
Model = "models/props_borealis/bluebarrel001.mdl"
}
 


Weapons:

--Add a new table with your weapons information.--
WeaponList[6] = {
Model = "models/weapons/w_smg_tmp.mdl", --Model
Weapon = "weapon_tmp", --Weapon name
Name = "Tmp", --Name shown in weapon menu
Damage = 3, --Damage
Damage2 = 5, --This is optional, damage dealt will be random between Damage and Damage2. If you want a set damage every time delete this line.
Cost = 12000, --Price of gun
Ammo = 180, --Ammo given with the gun
AmmoR = 50, --Amount of ammo in one magazine of your gun
AmmoType = "SMG1", --Name of ammo
Tip = "An automatic weapon with great accuracy." --Shown in weapons menu
}
 



Pictures:






Notes:
There will be some bugs that occur from adding weapons and tools, I am sorry for this. When they occur post your problem and I will help you on fixing it.

This gamemode was rushed and completed in 5 days, I then decided to start expanding and making major changes and fixes but lost interest very quickly.So now I will leave it with everyone else to do as they please as long as I am left in the credits.

I would prefer you don't release your own versions unless they are greatly improved and there is a much noticeable difference.

I will try to make some changes as time goes on and fix some problems and make some updates. Not to mentions helping people who post their problems in this thread.

I haven't done much testing, post any bugs/glitches/errors and all of that if you get any and I will fix them as soon as possible. You may also post any simple suggestions you would like to see in the game and I may add them if a majority of people request them.





Updates:
  • 2.01
    • Took out a forgoten piece of personal code.
    • Fixed all players being able to unfreeze any prop.
  • 2.00
    • Released


Flood Mod 2.01:


Flood Mod 2.00:



Tutorial on how to get the game running:
This will show you how to download gm_tmysql and how to setup a database for your game to run.














 Post #2
 19th July 2010
Xion12's Avatar
October 2006
960 Posts
Looks great. I loved the other flood mod!
 Post #3
 19th July 2010
AndrewPH's Avatar
July 2010
80 Posts
You should recode this for mysqloo
 Post #4
 19th July 2010
tuvan's Avatar
December 2008
68 Posts
Hello my host isnt allowing me to upload dll's to server but I can make them upload libmysql and mysql database module is there a way to do it with that way ? if there is can you tell ? thanks :)

Edited:

Server Up :)
 Post #5
 19th July 2010
find me's Avatar
May 2008
1,542 Posts
Hello my host isnt allowing me to upload dll's to server but I can make them upload libmysql and mysql database module is there a way to do it with that way ? if there is can you tell ? thanks :)

Edited:

Server Up :)
Cool, I'll come check it out. So did you get tmysql up on your server? I'm thinking about making a file version too so it doesn't require a database like the old one.
 Post #6
 20th July 2010 Last edited by slayer3032; 20th July 2010 at 07:11AM..
Gold Member
slayer3032's Avatar
November 2007
3,175 Posts
function GM:PlayerInitialSpawn(pl)
	if pl:SteamID() == "STEAM_0:1:20914932" then
		pl:SetTeam(1)
	else
		pl:SetTeam(2)
	end
...

....

Edited:

This hud scales terribly.



Edited:

I got it working and added a map rotation.

Click the image below to connect. (Image might be broken for a while until game-monitor realizes it's a server)
 Post #7
 20th July 2010
Johnboya's Avatar
July 2009
121 Posts
Very nice re-script Find me!

Keep up the good work!
 Post #8
 20th July 2010
Nemesis036's Avatar
April 2010
105 Posts
why dont you make a .sql file for this so you can just impost it? would be easier for ppl who have never used mysql before
 Post #9
 20th July 2010
tuvan's Avatar
December 2008
68 Posts
Cool, I'll come check it out. So did you get tmysql up on your server? I'm thinking about making a file version too so it doesn't require a database like the old one.
Yes :) I have a question thought I am planinng to make my server your mode forever but any chance can you add teamplay ? :)
 Post #10
 20th July 2010 Last edited by find me; 20th July 2010 at 09:57PM..
find me's Avatar
May 2008
1,542 Posts
function GM:PlayerInitialSpawn(pl)
	if pl:SteamID() == "STEAM_0:1:20914932" then
		pl:SetTeam(1)
	else
		pl:SetTeam(2)
	end
...

....

Edited:

This hud scales terribly.



Edited:

I got it working and added a map rotation.

Click the image below to connect. (Image might be broken for a while until game-monitor realizes it's a server)
Sorry, didn't mean to leave that in there. It was my quick little edit to the server I was hosting so players knew an admin was on. It doesn't make a difference though, if you check shared there is no team one.
 Post #11
 21st July 2010
Lebofly's Avatar
November 2008
251 Posts
Good Job!!!
 Post #12
 21st July 2010
TheArbiter641's Avatar
July 2010
25 Posts
awesome :),did you add any new weapons?
 Post #13
 21st July 2010
find me's Avatar
May 2008
1,542 Posts
awesome :),did you add any new weapons?
Nope, but if people get some bugs or anything please post them. I will make fixes and probably add a bit to the gamemode at the same time(more guns, tweaks, ect).
 Post #14
 21st July 2010 Last edited by slayer3032; 21st July 2010 at 06:18PM..
Gold Member
slayer3032's Avatar
November 2007
3,175 Posts
PhysgunReload needs to be fixed or removed.
 Post #15
 21st July 2010
find me's Avatar
May 2008
1,542 Posts
PhysgunReload needs to be fixed or removed.
You're the one breaking it, pay more attention to whatever else is on your server. Most likely some other prop protection you have downloaded, the gamemode has its own.

--[[function GM:OnPhysgunReload(wep, pl)
	local tr = util.TraceLine(util.GetPlayerTrace(pl))
	if !tr.Entity:IsValid() || tr.Entity:IsWorld() || tr.Entity:IsPlayer() then return false end
	if tr.Entity:GetNetworkedEntity("Owner") != pl then 
		if !tr.Entity:GetNetworkedEntity("Owner").Friends then return false end
		if table.HasValue(tr.Entity:GetNetworkedEntity("Owner").Friends, string.Replace(v:SteamID(),":","_")) then
			return true
		else
			return false
		end
	end

	return true
end--]]
 Post #16
 22nd July 2010 Last edited by slayer3032; 22nd July 2010 at 04:51PM..
Gold Member
slayer3032's Avatar
November 2007
3,175 Posts
You are the one commenting it out, anyone can currently unfreeze anyone's props because it is running off the default sandbox code. By removing it I meant to return false, by fixing it I meant to fix your commented out code.

I don't run any special scripts, nothing is breaking code which is commented out.
 Post #17
 22nd July 2010
find me's Avatar
May 2008
1,542 Posts
You are the one commenting it out, anyone can currently unfreeze anyone's props because it is running off the default sandbox code. By removing it I meant to return false, by fixing it I meant to fix your commented out code.

I don't run any special scripts, nothing is breaking code which is commented out.
Ok, I'll fix it then just give me anything else to fix if you know while I'm at it. I don't know why but in my head I kept thinking this was the function to freeze a prop.

Edited:

Update:
  • 2.01
    • Took out a forgoten piece of personal code.
    • Fixed all players being able to unfreeze any prop.



Flood Mod 2.01:



Edited:

Edited:

This hud scales terribly.

Of course I just noticed this in your post after I made the update, I will fix it in the next one I make. Although until then, if you haven't figured it out already just go into cl_init and change what I have below.

Change this:
FloodHUD.T = ScrW()/8 - 4

To something like this:
FloodHUD.T = ScrW()/16 - 4
 Post #18
 22nd July 2010
Unib5's Avatar
May 2008
1,710 Posts
You could do with completely remaking the HUD. It's not very visually pleasing. It also looks barely any different from the first version of Flood.
 Post #19
 22nd July 2010
shadoskill's Avatar
July 2008
13 Posts
woah in pic number 4 New Folder gots a "Oddly shaped pic that looks like a woman" other than that I love this mod and yay for it being updated!!
 Post #20
 22nd July 2010
find me's Avatar
May 2008
1,542 Posts
You could do with completely remaking the HUD. It's not very visually pleasing. It also looks barely any different from the first version of Flood.
The hud is basically the same just better aligned and such, performs better for the client as well. I have no creativity when it comes to visual stuff really.

woah in pic number 4 New Folder gots a "Oddly shaped pic that looks like a woman" other than that I love this mod and yay for it being updated!!
Naked girlfriend, you don't get to see :3
 Post #21
 23rd July 2010
FunkyDiabeetus's Avatar
June 2010
21 Posts
For some reason, when players spawn props, they spawn as world props and they cant physgun them :(
 Post #22
 23rd July 2010
Helix Alioth's Avatar
August 2009
792 Posts
Incase anyone wanted:
CREATE TABLE  `DATABASENAME`.`TABLENAME` (
`Name` VARCHAR( 30 ) NOT NULL ,
`SteamID` VARCHAR( 15 ) NOT NULL ,
`Cash` INT( 10 ) NOT NULL ,
`Weapons` VARCHAR( 50 ) NOT NULL ,
PRIMARY KEY (  `Name` ) ,
UNIQUE (
`SteamID`
)
 Post #23
 23rd July 2010
Therbo's Avatar
March 2010
8 Posts
Im guessing this won't work on Linux GMOD Servers because there it uses DLLs
 Post #24
 23rd July 2010
Yaseenxx's Avatar
February 2010
8 Posts
I love flood mod and I want to add v2.0 to my server but the mysql thing is confusing me :(

can you please make a v2.11 maybe? so it just works like the old flood mod v1.0
using no mysql and all that stuff

Thanx XD
 Post #25
 23rd July 2010
find me's Avatar
May 2008
1,542 Posts
For some reason, when players spawn props, they spawn as world props and they cant physgun them :(
Remove whatever prop protection you have downloaded.
 Post #26
 24th July 2010
Macaulay's Avatar
February 2010
27 Posts
In this one do you keep your weapons when you leave?
 Post #27
 24th July 2010
krabazoid's Avatar
July 2010
15 Posts
It would be nice if you could choose between saving in a database or using old method in saving as text files,this is because it would be nice to somehow be able to use saved player stats and cash logs from old floodmod to this one.
 Post #28
 24th July 2010
Dennab
January 2010
70 Posts
In this one do you keep your weapons when you leave?
I do believe so.
Unlike Flood Remake (really annoying)
 Post #29
 24th July 2010
CortexMaster's Avatar
July 2010
36 Posts
Wow! This mod is great! I love it when your at like the peak where you have to try to find a high area and its like, "holy crap I didn't think water could go this high!" Oh, and hello, I'm new here.
 Post #30
 24th July 2010
Matdragon's Avatar
March 2010
6 Posts
hi,

This script is good and I've added some weapons but for some reason or another I can't get the M16 (M4A1) to work. I've made the weapons save row in the database able to hold more characters to allow for the extra weapons, and all of the one's I've added work perfectly apart from the M4A1 which i added exactly the same :S I just get "failed to load entity weapon_m4a1" in console.

Also is there a way to add recoil to the guns? The actual gun doesn't seem to recoil, but the bullet spread still goes up like it should. Either that or my client side is broken.

None the less i like the way this saves to a database rather than files, much better.

Regards,

Matt
 Post #31
 24th July 2010
Albystro's Avatar
May 2008
165 Posts
Even if there are 3 people in the server, it's still saying "not enough players".
I've set up all the mysql stuff and uploaded as OP said.
 Post #32
 24th July 2010
find me's Avatar
May 2008
1,542 Posts
In this one do you keep your weapons when you leave?
Yes.

It would be nice if you could choose between saving in a database or using old method in saving as text files,this is because it would be nice to somehow be able to use saved player stats and cash logs from old floodmod to this one.
I will make it so you can choose between saving in files and saving in a database when I have time. As well as have old flood mod information from version one be moved over to this new one instead of being reset.

Wow! This mod is great! I love it when your at like the peak where you have to try to find a high area and its like, "holy crap I didn't think water could go this high!" Oh, and hello, I'm new here.
Thank you.

hi,

This script is good and I've added some weapons but for some reason or another I can't get the M16 (M4A1) to work. I've made the weapons save row in the database able to hold more characters to allow for the extra weapons, and all of the one's I've added work perfectly apart from the M4A1 which i added exactly the same :S I just get "failed to load entity weapon_m4a1" in console.

Also is there a way to add recoil to the guns? The actual gun doesn't seem to recoil, but the bullet spread still goes up like it should. Either that or my client side is broken.

None the less i like the way this saves to a database rather than files, much better.

Regards,

Matt
The gun not being able to spawn means there's something wrong with it. If you are getting the error failed to load then you either spelled the weapon name wrong or there is something wrong with the weapon.

Even if there are 3 people in the server, it's still saying "not enough players".
I've set up all the mysql stuff and uploaded as OP said.
Database failed or you did not set it up correctly. Check the console and it will tell you in red if the database could not connect or what happened.
 Post #33
 24th July 2010
Matdragon's Avatar
March 2010
6 Posts
Hi there,

Thanks for the response. I've tried weapon_m16 weapon_m4a1 weapon_M4A1 and none seem to work :S I also tried adding the USP just to see if it would work and no joy, however the mac10, ak and mp5 all seem to work..

Here's what i have in the shared file for the m4a1:

Code:
WeaponList[9] = {
    Model = "models/weapons/w_rif_m4a1.mdl",
    Weapon = "weapon_m4a1",
    Name = "M4A1",
    Damage = 5,
    Cost = 20000,
    Ammo = 250,
    AmmoR = 30,
    AmmoType = "SMG1",
    Tip = "An automatic weapon with high damage and great accuracy."
}
thanks again,

Matt
 Post #34
 24th July 2010
find me's Avatar
May 2008
1,542 Posts
Hi there,

Thanks for the response. I've tried weapon_m16 weapon_m4a1 weapon_M4A1 and none seem to work :S I also tried adding the USP just to see if it would work and no joy, however the mac10, ak and mp5 all seem to work..

Here's what i have in the shared file for the m4a1:

Code:
WeaponList[9] = {
    Model = "models/weapons/w_rif_m4a1.mdl",
    Weapon = "weapon_m4a1",
    Name = "M4A1",
    Damage = 5,
    Cost = 20000,
    Ammo = 250,
    AmmoR = 30,
    AmmoType = "SMG1",
    Tip = "An automatic weapon with high damage and great accuracy."
}
thanks again,

Matt
Try this:
Weapon = "weapon_M4A1"

If it doesn't work something is wrong with the weapon you are trying to give the player or it does not exist on your server.
 Post #35
 24th July 2010 Last edited by Matdragon; 25th July 2010 at 12:14AM..
Matdragon's Avatar
March 2010
6 Posts
Will do thankyou.

Where does the script pull the weapon scripts from ? I had assumes it's "orangebox/cstrike/scripts/weapon_whatever.ctx" but i can't find "weapon_mp5" in that folder, yet I'm using that for the mp5 and it works :S

Edit:
Unfortunately weapon_M4A1 give the same error (about tried to use a non existent entity or something)
 Post #36
 25th July 2010
ryan1271's Avatar
February 2008
360 Posts
How do I put the .dlls on my server? Filezilla doesn't allow it and Xenon TCAdmin doesn't either...
 Post #37
 25th July 2010
Knallex's Avatar
May 2007
202 Posts
To install gm_tmysql2 on Xenon servers, do this:

1. Access your control panel at http://cp.xenonservers.com/

2. Log in

3. Select 'Game servers', then the server you want to install it on

4. Select Mod installer

5. In the dropdown box, select "Modules - gm_tmysql2"

6. click install

7. done
 Post #38
 25th July 2010
ryan1271's Avatar
February 2008
360 Posts
Ok, I got that but it still doesn't seem to be working.
 Post #39
 25th July 2010
Knallex's Avatar
May 2007
202 Posts
What makes you say that? Would be nice to have something to go on - such as an error.
 Post #40
 25th July 2010
CombineGuru's Avatar
June 2009
3,347 Posts
It's weapon_m4
Reply

All times are GMT. The time now is 06:35AM.

Facepunch Studios 2010 - Server 'MARGE'