
Haunted Dawg
Members-
Posts
2,933 -
Joined
-
Last visited
Never -
Days Won
1
Content Type
Profiles
Forums
Events
Everything posted by Haunted Dawg
-
Re: [MOD] V2 Male & Female count also Males & Females that are Online You dont have a single while function in there, im sure it wont work. <?php $deactive = 1; //Deactive wether it will be in a new page or not.... 1 => on || 0 => off if($deactive == 1) { include("globals.php"); } else { //Do nothing } //count $males = mysql_num_rows(mysql_query("SELECT userid FROM users WHERE gender='Male'")); $females = mysql_num_rows(mysql_query("SELECT userid FROM users WHERE gender='Female'")); //list $dip_m = mysql_query("SELECT userid,username FROM users WHERE gender='Male' AND laston>unix_timestamp()-60*60 ORDER BY laston DESC LIMIT 20"); $dip_f = mysql_query("SELECT userid,username FROM users WHERE gender='Female' AND laston>unix_timestamp()-60*60 ORDER BY laston DESC LIMIT 20"); //Display male & Female echo ' [b]Males:[/b] '.$males.' [b]Females:[/b] '.$females.' '; //Display males online $c = 0; while($soc = mysql_fetch_assoc($dip_m)) { $c++; echo $c.'- [url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].'[/url] '; } echo ' '; //Split them both //Display females online $c = 0; while($soc = mysql_fetch_assoc($dip_f)) { $c++; echo $c.'- [url="viewuser.php?u='.$soc['userid'].'"]'.$soc['username'].'[/url] '; } $h->endpage(); ?>
-
Re: The Standards of CE Mod! @ Blue: First of all blue. I have not seen you around that much. I'm pretty sure you never read my post properly. Second of all, read it over and post back. @ MrGi: Read the post correctly. @ Djkanna: Read the post correctly.
-
Re: Car Mod @ MrGi: Why the need to spam? Trying to boost up your post count? Pretty lame.
-
Re: The Standards of CE Mod! Well, some people are able to be trusted. Some not. Give other's a chance, see how they do.
-
Re: Mine Shaft [FREE] <?php require "globals.php"; $_POST['shaft'] = abs(@intval$_POST['shaft'])); echo '<h3>Mine Shalf</h3>'; $shaft_array = array ( 1,5,10,25,50,60,75,100 ); //Make the first ifstatement shorter if(in_array($_POST['shaft'],$shaft_array)) //Check in the array wether the post is in the array { $costi = $ir['level']*2+3; // Normal level gain is +2 brave each level so $ir['level']*2+3 the plus 3 is because they start with 5 is the max will for the users level $cost = $costi/2; // the divide 2 allows multiple goes if oyu add a 3 they will get 3 goes and so on if($ir['brave'] < $cost) // checks to see if the user has enough brave { echo 'Invalid Command. You don\'t have enough brave for this shaft. >[url="'.$_SERVER['PHP_SELF'].'"]Go Back[/url]'; $h->endpage(); exit; } if($_POST['shaft'] <= 25) // checks if its a money function { $earn = rand(1, $_POST['shaft'])*2; // example: 44 multiplied by 2 equals 88, so the user gets $88 (i suggest editing this to maybe *5) which then would equal $220 $Mtype = 'money'; // This is basically what tells the sql query several lines down what to add depending on shaft in this case money } elseif($_POST['shaft'] > 25 AND $_POST['shaft'] <= 100) // checks if its a crystal function { $earn = rand(1, $_POST['shaft'])/2; // example: 88 divided by 2 equals 44, so the user would get 44 crystals (that's using shaft 100 [the max]) $Mtype = 'crystals'; // This is basically what tells the sql query several lines down what to add depending on shaft in this case crystals } $chance = rand(1, 3); if($chance == 3) { echo '<font color="green">[b]You\'re mining trip came out to be successful, you earned: $'.$earn.' congratulations.[/b]</font>'; $query = sprintf('UPDATE `users` SET %s = %s + %u, brave = brave - %u WHERE userid = %u', $Mtype, $Mtype, $earn, $cost, $userid); // %s is text AND %u is numbers $db->query($query); } else { echo '<font color="red">[b]You\'re mining trip came out to be disastrous.[/b]</font>'; $query = sprintf('UPDATE `users` SET brave = brave - %u WHERE userid = %u', $cost, $userid); $db->query($query); } echo ' >[url="'.$_SERVER['PHP_SELF'].'"]Go Back[/url]'; $h->endpage(); exit; } else { echo ' <form action="'.$_SERVER['PHP_SELF'].'" method="post"> <table width="60%" class="table" border="1" align="center"> <tr> <th width="50%">Level</th> <th width="50%">Do</th> </tr> <tr align="center" class="h"> <td colspan="2">Money</td> </tr> <tr align="center"> <td>1</td> <td><input type="radio" name="shaft" value="1"></td> </tr> <tr align="center"> <td>5</td> <td><input type="radio" name="shaft" value="5"></td> </tr> <tr align="center"> <td>10</td> <td><input type="radio" name="shaft" value="10"></td> </tr> <tr align="center"> <td>25</td> <td><input type="radio" name="shaft" value="25"></td> </tr> <tr align="center" class="h"> <td colspan="2">Crystal</td> </tr> <tr align="center"> <td>50</td> <td><input type="radio" name="shaft" value="50"></td> </tr> <tr align="center"> <td>60</td> <td><input type="radio" name="shaft" value="60"></td> </tr> <tr align="center"> <td>75</td> <td><input type="radio" name="shaft" value="75"></td> </tr> <tr align="center"> <td>100</td> <td><input type="radio" name="shaft" value="100"></td> </tr> <tr align="center" class="h"> <td colspan="2"><input type="submit" value="Mine"></form></td> </tr> </table>'; } $h->endpage(); ?> Your getting there m8. Keep it up.
-
Re: The Standards of CE Mod! I never said it would be a CE job position. I'm just saying, you can't just give it to people are big critics: Floydian Luke Nyna Luke like's criticising alot of people's work. Floydian, would'nt say he criticises but he would be good for this. Nyna keep's on posting: All i'm just saying is, you can't just bring those 3 into the hidden position. But say about 10 people. These are the people i would choose: Don't just take people you trust. Take people who post, who is online alot, who helps alot. I am not telling you here to run your forum. But it would be best to not just choose people you trust.
-
Re: The Standards of CE Mod! Just to let you know, if i do become a mod approval. I wont just accept friend's post's. I will first look at the mod if there is something wrong, ill aprove it then post an updated version => no bugs etc. I would just think that the mod approval would be cool because then it would be easier to find mod's that work and stop posting topic's about how to get this working and that. How many post's are there on how to fix the item market? Cron issues? TOO MANY!
-
Re: The Standards of CE Mod! MrGi, do you want to know why us big coder's who know what we are doing dont post our good mod's for free and ask for a bit of cash? No, it's not because i want to make money. I can't even touch my money that goes into paypal. But the fact is, if we release all the paid mod's for free. What will happen? All of you people who can't code, grab the code and say you made it. Then try and sell our work. We will find out one way or another. Heck, i sold how many mod's to jameo, but never knew he was like he is. Giving mod's away for free? Seriously. It is illegal to just give some one else's stuff away. How about you got a car. I go and give your car away. What will that be? Im sure you would be like WTF!. So my point of this post is, if we do help you "newbs", what will happen? You guy's will just act like you guy's did the coding. Making you look all big etc. Dont tell me im lying. I am not. I've been through it. I have helped many people on there game's in the past, what do they do? Announcement (1) Do you even see "Thank's to blah name". NO! Maybe you might not read this post but what the heck. Majority of you don't even read post's and just post blabarish bullshit. Take in mind that, if all hacker's help all the people who want to be hacker's. What will happen to this place we call the "INTERNET WORLD"? Also take in mind, we can't give our hard time work away for free. It will be like giving you $500 dollar's. Another thing you should take in mind in this long post... I do not mind you people posting mod's. What pisses me off is that, you will grab a mod, change a couple letter's like my brothel mod. Change it to whorehouse and then call it Whore House Mod [v2] as the title and in the post: Do i see there NO! And what, you going to tell me people wont know how to change "brothel" to "whorehouse"? Please, ill post back to you any time.
-
Re: [MOD] House Images Your staff_houses.php will entere incorectly.
-
Re: The Standards of CE Mod! He never posted no mod m8. He wrote a validation script but never released it for free.
-
Re: The Standards of CE Mod! Radio active, in one of your post's i saw you mentioned nurple's. Well he only posted one post wich has got nothing to do with mod's.
-
Re: Javascript + Ajax Don't worry, thank's for this. It work's very well for me. Just like i wanted it to work. Anyway i got it all working fine now without going to new page etc.
-
Re: Javascript + Ajax Will it work's good, but now when i type a message it redirect's me to the php page.
-
Re: Javascript + Ajax This is my current code in the file. <?php //Added <?php tags to make it look neater function _3() { global $ir,$h,$set,$data; echo '[b]Shoutbox Room[/b] '; if(file_exists("shoutbox.php")) { echo ' <div id="ShoutBox.Room" style=" height:400px; width:98%; overflow:scroll;"> <script type="text/javascript" language="javascript"> var xmlHttp; function GetXmlHttpObject() { var objXMLHttp=null; if (window.XMLHttpRequest) { objXMLHttp=new XMLHttpRequest(); } else if (window.ActiveXObject) { objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP"); } return objXMLHttp; } function update() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { return; } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4 && xmlHttp.status == 200) { var response = xmlHttp.responseText; if (response) { document.getElementById("ShoutBox.Room").innerHTML=response; } } } //change the url to the chatbox file var url="shoutbox.php"; xmlHttp.open("get", url+ "?ms=" + new Date().getTime()); xmlHttp.send(null); } //5 seconds setInterval("update()", 5000); </script> <iframe name="Shoutbox Room" marginwidth="0" marginheight="0" border="0" frameborder="0" table-align="center" height="400" width="100%" scrolling="auto" src="shoutbox.php"> </iframe> </div>'; } else { echo 'Shoutbox Currently Down.'; } _back(); } ?> Sorry if i am putting it in the wrong place, but unfortunatly im not very aware of how ajax or javascript work.
-
Re: Javascript + Ajax Where would i put this bit of code: <script type="text/javascript" language="javascript"> var xmlHttp; function GetXmlHttpObject(){ var objXMLHttp=null; if (window.XMLHttpRequest){ objXMLHttp=new XMLHttpRequest(); }else if (window.ActiveXObject){ objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP"); } return objXMLHttp; } function update() { xmlHttp=GetXmlHttpObject(); if (xmlHttp==null){ return; } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4 && xmlHttp.status == 200) { var response = xmlHttp.responseText; if (response) { document.getElementById('shoutbox').innerHTML=response; } } } //change the url to the chatbox file var url="shoutbox.php"; xmlHttp.open("get", url+ '?ms=' + new Date().getTime()); xmlHttp.send(null); } //5 seconds setInterval("update()", 5000); </script> And i never knew there was a ajax board.
-
Re: Javascript + Ajax That is refreshing the entire page. I just want to refresh the <div id="shoutbox"> tag.
-
Hello there, i need a little script that will refresh the <div> tag's. I aint so good in javascript nor ajax so i was wondering if you could help me. There is no board in here for ajax, so i put it here. This is my current script: echo ' <div id="shoutbox"> <iframe name="shoutbox" marginwidth="0" marginheight="0" border="0" frameborder="0" table-align="center" height="400" width="100%" scrolling="auto" src="shoutbox"> </iframe> </div>'; Can anyone help me?
-
Re: Guess the next poster nah, Armageddondude next.
-
Re: The Standards of CE Mod! Genocide wrote it first, but it was a waste.
-
Re: The Standards of CE Mod! Or just make a new position, "mod aprovals" That way, those people who aprove mod's can aprove them and then it will be displayed.
-
Re: The Standards of CE Mod! True, i agree with you on that. The amount of post's i find when looking through my unread post's since last visit. 1 day and i come back with 1-3 page's. BUT! That is a good thing that there are so many post's but the shit thing is, its just bunch of crap that has been posted.
-
Re: Finding Items in the city Well ok, i really do not work on the global_func.php file. I work on my own coding. As i know it should work good.
-
Re: Finding Items in the city Mmmm, i never knew the item_add() function check's if the user has the item or not. My mistake. $rand = rand(1,5); //Rand to check if he get's the item or not. if($rand == 3) //Now if it is rand 3 continue { $data = mysql_query("SELECT itmid,itmname FROM items WHERE itmbuyable=1 ORDER BY itmid rand() LIMIT 1"); //Query the item $soc = mysql_fetch_assoc($data); //Fetch variable $data $item = $soc['itmid']; //Item ID //Check if item exists and etc if(!$item) //Give false event { event_add($ir['userid'],"You thought you saw something lying on the ground while walking the city, but it was nothing."); //Event false event } else //Else give item { //Credit item and event user. item_add($ir['userid'],$item,1); event_add($ir['userid'],"You found ".$soc['itmname']." item while walking the city"); //Event user that he got item name blah. } }
-
Re: Finding Items in the city The use of that query: $while = mysql_query("SELECT * FROM inventory WHERE inv_userid=".$ir['userid']." AND inv_itmid=".$item); It is selecting from inventory where inv_userid is my id & itm id is the item. If the user has the item, we adjust the inv_qty=inv_qty+1 ELSE it inserts into the inventory. Does that answer your question?
-
Re: Finding Items in the city Nyna, did you read over the code? It check's if the user has the item, and if he does then it add's up if not it inserts.