- Joined
- Dec 4, 2010
- Messages
- 59
- Reaction score
- 17
Re: The 'Show Off' thread - Part 2
Well, so what's the problem?I'm aware of what sqlsrv is.
Well, so what's the problem?I'm aware of what sqlsrv is.
Well, so what's the problem?
Okay. but this class is not finished . Besides that I am using parameterized queries and I have to add Singleton and remove some useless lineIt's overcoded for a database handler class, so much useless lines.
I'll try to write you one in a bit.
<?php
class dbhandler
{
//The variable that holds the database connection.
private $_link;
//The count of queries executed.
public $_queryCount;
//The database host
private $_databaseHost;
//The database name
private $_databaseName;
//The database user
private $_databaseUser;
//The database password
private $_databasePassword;
//Did it connect?
private $_databaseConnected;
//The query that the class is working with
private $_classQuery;
public function __construct($database)
{
//Set our database values.
$this->_databaseHost = $database['host'];
$this->_databaseName = $database['name'];
$this->_databaseUser = $database['user'];
$this->_databasePassword = $database['password'];
$this->connect();
}
public function connect($host = $this->_databaseHost, $user = $this->_databaseUser, $pass = $this->_databasePassword, $dbn = $this->_databaseName)
{
//Check if there was a conncetion already started.
if($this->_databaseConnected)
return;
$this->_link = mssql_connect($host, $user, $pass) or die("MSSQL error. Contact an Administrator");
mssql_select_db($dbn, $this->_link) or die("Database not found!");;
//Tell the system we're connected.
$this->_databaseConnected = true;
}
public function disconnect()
{
//Close the connection.
mssql_close($this->_link);
//Tell the system we're disconnected.
$this->_databaseConnected = false;
}
public function perpare($databaseQuery)
{
$this->_classQuery = $databaseQuery;
return $this;
}
public function execute()
{
$this->_queryCount++;
return new mssqlResult($this->_classQuery, $this->_link);
}
}
class mssqlResult
{
//Query.
private $_queryObj;
//Query result
private $_queryResult;
public function __construct($query, $link)
{
$this->_link = $link;
$this->_queryObj = mssql_query($this->_queryObj, $link);
}
public function result()
{
return $this->_queryResult;
}
public function fetch_array()
{
return mssql_fetch_array($this->_queryResult);
}
public function num_rows()
{
return (int)mssql_num_rows($this->_queryObj);
}
}
?>
My taunt at 0:12 :glare:Classic DM
Classic Gametype.
- Tripled the damage dealt by any gun to give the FPS feeling to it.
- Zoomed a bit to the gun, can be easily noticed.
- Disabled tumble/dashes.
- No melee.
- HP/AP capped to 100/100 to balance the tripled damage thing.
For ****'s n' giggles haha I might do some more work to it sometime later but I'm not sure:
I'm working on adding smoke and possibly fire to the Plants aswell :beer:![]()
![]()
![]()
![]()
![]()
I hate math. It is very hard and incomprehensible.
I've rewrote everything. Eventually it is not looks like HGG.
but I think it is good than old one...?
To view the content, you need to sign in or register
For ****'s n' giggles haha I might do some more work to it sometime later but I'm not sure:
I'm working on adding smoke and possibly fire to the Plants aswell :beer:
Nice, is that based on your bed room?
Wassup?
de_aztec from Cs 1.6 full remake
(Made using GTK Radiant ><')
Wassup?
de_aztec from Cs 1.6 full remake
(Made using GTK Radiant ><')
I was bored ok? =)I dont understand why people recreate maps x.x it is really unoriginal and just lammee
Don't use textures to give yourself credits..
If you do we can easily take the unedited texture, overwrite a new name > change name and I can say WOOHOO I MADE THAT MAP
okay?
and yes we can see you used gtk, 3ds etc would look much better
btw;
Screen of water pl0x
I dont understand why people recreate maps x.x it is really unoriginal and just lammee
If a Map is decent enough to recreate and would be a Fun map to play in there is no reason to not recreate it.
It is not unoriginal, It's called seeing a Map you like and Remaking it. There is nothing lame about it.
I'd rather have a Decent Map from another Game that's "Unoriginal" and I like than a bunch of Maps that aren't recreated that I don't like.
This is like running along the lines of "Oh, that Map was simple to make and didn't take long so it sucks."
Doesn't matter if it took 5 Minutes and 5 Brushes, if the Map is decent, who cares HOW it was Made?
It does not Matter HOW it was made, but what the OUTCOME of it is.
I'll reiterate my point I made before, what if the Eiffel Tower took a Bunch of Tree sticks and some Mud?
That doesn't mean it's a sucky structure that just means it was simple to make. (Which, it obv. wasn't)
There is nothing wrong with recreating a map if you do a decent job at it.
It seems to me the Gunz section dislikes a lot of work due to absurd reasons 90% of the time, just to be that little rebel that always dislikes something and is never satisfied.
Regardless of how you see it, recreating a map from another game is just silly, it isn't absurd to say using other peoples work and creating something sub-par is lame because it just is. You put this metaphor of the Eiffel Tower in your debate, but you fail to look it from all angles. Just because the structure resembles that of the Eiffel Tower, a tower made of sticks and mud is just sticks and mud, not only is it not sturdy and will fall during the next rain, it has imperfections and lack of detail that just make it look disgraceful.
I take pride in the fact that everything I create is 100% mine, not some guys render who I just built a model around, or some guys art project I redrew and said "Yah that looks good," but something I created with my own time and resources. Yes my stuff sucks, and I probably will never get up to the same quality as some of the people I idol, but I have enough respect for those artist, the people that make me excited to work on my own projects, to not rip and recreate their work.
I agree the things people rant about in this section are silly sometimes, and maybe I am just an outlier compared to other devs, but to think it is simply okay to be unoriginal, not creative, and disrespectful is just foolish. We call ourselves "Developers" yet we don't develop anything, Gunz isn't getting better with this stuff, we are just feeding on the status quot set by the people before us.