
Arek
Members-
Posts
23 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Arek
-
Maybe your not drunk enough :P If your not sober you can get a hang over
-
Hey Do you mean how to give an item to a user when they donate?
-
Hey That wouldent work, that error ususaly means that the sql statement wasn't valid or failed
-
Hey The game seems out of theme to me, the buildings look like a 'today' themed game. Maybe the future wont change that much (flying cars, neon lights covering buildings etc) buts thats what i think about when you said futuristic. Maybe iv been playing too much bioshock but thats what i think about (not saying that others think the same as me) My eyes dont seem to know where to look, there is text everywhere with a whole lot of 'notes' makes it look untidy and distracts from the game. Sorry if the review seems harsh but its not ment to be. Im sure the game has a good backend but to be the graphics/layout dont match.
-
It woudlent work with that code, thats only giving the item 100ammo
-
:) Hi By the looks of it, it is adding 'ammo' for all items with the type 4 (weps? maybe duno) from the 'readme' it should be giving the users 100 ammo each (duno?) but the query will only insert the itemid (not userid) Or it could be building a 'shop' like thing where it will list all weps and display how much ammo you can buy? Not sure would need more code.
-
Hey Hey, the sql was fine but there was a error, i dident user $stmt->store_result to save it. Dont see how this helps when programming but it fixed it anyway :)
-
$stmt = $mysqli->prepare('SELECT user_name from `user_details` where user_email = ?'); $stmt->bind_param('s', $var); $stmt->execute() or $this->myerror[] = $stmt->error; Any idea why this wont work, and wont give a error?
-
Hi Both statements should run together no need to "join" them. Is it possible that $rand2 gave a random number of 0?
-
Hey You need a where clause like "where userid=$userid"
-
Just delete the rest! :p >.> (dont)
-
Done some more reading and placing "php_value error_reporting 0" in htaccess would work too (better, depending on how you look at it) and no thanks :P
-
Yes :)
-
If i remember correct error_reporting(0) should work. Also in php.ini you can use display_errors = off
-
Thats true but most people wont stay loyal to a game if there is only say 5 people logged in at the same time. Maybe a good way to combat this is to let them preregister their username/email. When the game is officially launched you will be able to inform them the game is launched and will get more people online/playing at the same time.
-
No matter how good the game is, you have to get the word out to get the users in. Iv seen plenty of sites that are way better in content/design go down because they didn't get the users in. So spend a little time thinking about how to get that word out and good luck with your game.
-
This is my first mod that i have tryed to stick to OOP. Hasn't been tested to much. Table: CREATE TABLE IF NOT EXISTS `user_ip_logs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userid` int(11) unsigned NOT NULL, `ip` int(11) NOT NULL, PRIMARY KEY (`id`) ) Make a new page (I called it func_getip.php). You will need to include this in globals.php class get_ip{ protected $userid; protected $curr_ip; protected $last_ip; protected $uid; function __construct($uid=NULL){ global $ir; ($uid)?$this->set_userid($uid):$this->set_userid($ir['userid']); } function set_userid($uid){ $uid=$uid; $this->uid=$uid; } function get_userid(){ return $this->uid; } function get_last_ip(){ global $db; $q=$db->query("SELECT * FROM user_ip_logs where userid=".$this->get_userid()." ORDER BY id DESC LIMIT 1"); $ip=long2ip($row['ip']); return $ip; } function set_current_ip(){ $ip = getenv('REMOTE_ADDR'); $ip = trim($ip); $ip = preg_replace("/[A-z_-]/","",$ip,-1,$count); $ip = mysql_real_escape_string($ip); // $ip=($count)? $ip=false : $ip=ip2long($ip);; $this->curr_ip=$ip; $this->insert_ip(); } function get_curr_ip(){ $ip = $this->curr_ip; return $ip; } function get_last_ips(){ global $db; $q=$db->query("SELECT * FROM user_ip_logs where userid=".$this->get_userid()." ORDER BY id DESC limit 50"); $arr=array(0 => "Default"); while($row=mysql_fetch_array($q)){ $arr[]=long2ip($row['ip']); }; return $arr; } function insert_ip(){ global $db,$ir; $uid=$ir['userid']; $ip=ip2long($this->get_curr_ip()); $q=$db->query("SELECT COUNT(*) FROM user_ip_logs where userid=".$uid." and ip ='".$ip."' limit 1"); $q=mysql_fetch_array($q); if(!$q[0]) $db->query("INSERT INTO user_ip_logs(userid,ip) VALUES (".$uid.",'".$ip."')"); } function compair_ip($uid2){ $ip1=$this->get_last_ips(); $ip2=new get_ip($uid2); $ip2=$ip2->get_last_ips(); if(count($ip1)>count($ip2)){ $search=$ip1; $other=$ip2; } else{ $search=$ip2; $other=$ip1; } foreach($search as $value){ if(array_search($value,$other)) $num++; } if($num) return true; else return false; } } $ip_func=new get_ip(); $ip_func->set_current_ip(); ?> Example 1: $ip_func = new get_ip(intval($_POST['user'])); $check = $ip_func->compair_ip(intval($_POST['user2'])); //Userid of the second person. if ($check) echo "Same ip"; //Returns true if its the same ip, false if not. else echo "Diff ip"; Example 2: $ip_func=new get_ip(); //Leave blank for logged in user $check=$ip_func->compair_ip(intval($_POST['user'])); if ($check) echo "Same ip"; else echo "Diff ip"; [paypal][email protected][/paypal]
-
Replace event_add($youdata['userid']," You Tried to beat [url='viewuser.php?u=$userid']{$odata['username']}[/url] but stalemated.",$c); with event_add($youdata['userid']," You Tried to beat [url='viewuser.php?u=".$odata[']{$odata['username']}[/url] but stalemated.",$c);
-
Hey Good idea, might be a good idea to charge a monthly subscription (Same as webhosting), or even charge them for the amount of users they hold. Maybe if they have under 100 users its free but if they go over that limit they pay a small fee, and so on. Maybe make it possible for them to use their own domains but you still provide the hosting.