Jump to content
MakeWebGames

NationGamer

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by NationGamer

  1. thanks guys finally got this working and thanks DJK that worked like a charm exept for i had to edit the class alittle bit as it wasnt reconizing the function exp needed part but that helped with display part of the mod and made the warning disapear on gang page so thanks again
  2. you should also avoid using <center> tags as it is deprecated
  3. see thats what im trying to do make it without the exp_needed field in db as that is the same how users one is worked out
  4. http://makewebgames.io/board791/28107-any-version-removal-of-1-minute-crons/ there is the 1 min removal would be pretty simple to rewrite to a 5 mins removal also
  5. thanks for you advice guys and silver ive edit sql now to only select what i actually need thanks
  6. ok im trying to recreate the user level function firsty here is the function i made   THANKS TO DJKANNA FIXED   so i dont know what is causing this could someone please help thank you very much
  7. hello i have edited my login script and just wondering on advice will it effectivly work and is it pretty secure   FIXED   really need advice on this part of the login script i made it arlier and just wondering if it would properly work within a open game thanks
  8. That's what I'm talkin' about ;) BTW, when someone guesses correctly, does it reset? I can't pinpoint where in the code it does that, but I'd blame me for that :P yes it resets everytime someone guesses as if you look how numbers are generated they are randomized so everytime someone guesses the number changes if they crack it or dont it will reset
  9. like this , jtime= unix_timestamp() + jailtimehere
  10. thanks for feedback and yh i dont like using array myself this way i could achieve the same thing with knowing i wouldnt mess up as much and ive edited the int and tried securing the post as much as i know anyways lol thanks
  11. WRONG you dont have to declare what fields aslong as they are in the correct order and you are inserting all the values into that table mccodes uses that query all over you never have to declare every field name
  12. yeah for sure i love how it updates now as i hated to see the not dynamic as it look cheap and nasty and lowers the game alot in user eyes
  13. some feed back there was about 20 errors   REMEMBER 1) never mix html and php 2)always open and close print e.g print "hello"; 3) it is spose to be closed like <a href='hello'>Hello just some feedback that might help you in future when making your mods try this tested and working: <?php include "globals.php"; print " [b]Welcome to the world of ****, {$ir['username']}.[/b] The first thing that you will be doing is choosing your 3 characters, their names, gender, and whether they will be good or evil. [b]There are 4 character types to choose from.[/b] [b]Lycan[/b] - Humanoid like creatures that were once human. These beings were bitten by other infected lycans thus transforming them. [b]Vampire[/b] - Beings that were once human that have been turned into the undead. They now survive on the blood of other beings. [b]Angels[/b] - Beings that have chosen to leave Nirvana in order to defend mankind. [b]Demons[/b] - Beings originally created to do Dante's work that have since evolved to become a force in their own right and serve only themselves now. [b]Choose your characters.[/b]"; switch($_GET['action']) { case 'characterone': character_one(); break; case 'charactertwo': character_two(); break; case 'characterthree': character_three(); break; } { print "[url='choices.php?action=characterone']Your first character.[/url]"; } { print "[url='choices.php?action=charactertwo']Your second character.[/url]"; } { print "[url='choices.php?action=characterthree']Your third character.[/url]"; } function character_one() { global $db,$ir,$userid,$h; //$name='charname'; //$type='type'; //$gender='gender'; //$alignment='alignemnt'; { print " <form action='choices.php?action=characterone' method='post'> <option value='Lycan'>Lycan</option> <option value='Vampire'>Vampire</option> <option value='Angel'>Angel</option> <option value='Demon'>Demon</option> </select>"; } { print "<option value='Male'>Male</option> <option value='Female'>Female</option> </select>"; } { print "<option value='Good'>Good</option> <option value='Evil'>Evil</option> </select>"; } print "Name this character:<input type='text' name='charname' size='20'/> <input type='submit' value='Submit Character One'/> </form>"; $db->query("INSERT INTO charone VALUES ('$name','$type','$gender','$alignment')"); } function character_two() { global $db,$ir,$userid,$h; $name='charname'; $type='type'; $gender='gender'; $alignment='alignment'; { print " <form action='choices.php?action=charactertwo' method='post'> <option value='Lycan'>Lycan</option> <option value='Vampire'>Vampire</option> <option value='Angel'>Angel</option> <option value='Demon'>Demon</option> </select>"; } { print " <form action='choices.php?action=charactertwo' method='post'> <option value='Male'>Male</option> <option value='Female'>Female</option> </select>"; } { print " <form action='choices.php?action=charactertwo' method='post'> <option value='Good'>Good</option> <option value='Evil'>Evil</option> </select>"; } print "Name this character:<input type='text' name='charname' size='20'/> <input type='submit' value='Submit Character Two'/> </form>"; $db->query("INSERT INTO chartwo VALUES('$name','$type','$gender','$alignment')"); } function character_three() { global $db,$ir,$userid,$h; $name='charname'; $type='type'; $gender='gender'; $alignment='alignment'; } { print " <form action='choices.php?action=characterthree' method='post'> <option value='Lycan'>Lycan</option> <option value='Vampire'>Vampire</option> <option value='Angel'>Angel</option> <option value='Demon'>Demon</option> </select>"; } { print " <form action='choices.php?action=characterthree' method='post'> <option value='Male'>Male</option> <option value='Female'>Female</option> </select>"; { print " <form action='choices.php?action=characterthree' method='post'> <option value='Good'>Good</option> <option value='Evil'>Evil</option> </select>"; } print "Name this character:<input type='text' name='charname' size='20'/> <input type='submit' value='Submit Character Three'/> </form>"; $db->query("INSERT INTO charthree VALUES('$name','$type','$gender','$alignment')"); } $h->endpage(); ?>
  14. not really i wouldnt pay him 10 cent as it simple copy and past code from mccodes login regiter and so on into the layout as it has ajax and the styles already there so $3 a rip off as you could get a mod on here for about same price that has been actually coded by the person and not bretching any copyrights and who would want to use it as they would have to keep the copyright link on the layout and i wouldnt want a game with someone elses name on it
  15. it because the jailtime must be inserted with unix_timestamp if it isnt you will always go back to the previus time it started at
  16. with this modification you can quickly reserver or blacklist usernames i made it quickly but i did test it and all should work and i thought the mod would come in handy and yes before people say i know you can do this in an array but with this you can add an admin function open register.php ok firstly find: if(strlen($_POST['username']) < 4) { die("Sorry, the username is too short. >[url='register.php']Back[/url]"); }   underneath add: $rname=mysql_query("SELECT * FROM `reserved_names` WHERE `Rname` = '".$_POST['username']."'"); if(mysql_num_rows($rname)) { die("Sorry, The username is either reserved or blacklisted. >[url='register.php']Back[/url]"); }   then insert this sql into your database: [mysql] CREATE TABLE IF NOT EXISTS `reserved_names` ( `id` smallint(1) NOT NULL auto_increment, `Rname` varchar(30) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ; -- -- Dumping data for table `reserved_names` -- INSERT INTO `reserved_names` (`id`, `Rname`) VALUES (1, 'Admin'), (2, 'Moderator'), (3, 'GM'), (4, 'FM'), (5, 'Admin'), (6, 'Owner'), (7, 'Programmer'), (8, 'Coder'), (9, 'Test'), (10, 'Tester'), (11, 'Demo'); [/mysql] ive put some usernames already in there so you get how it works if you didnt understand.     Staff Functions   find in smenu.php   > [url='staff.php?action=announce']Add Announcement[/url]   just below add:   > [url='staff.php?action=reserve']Reserve Username[/url]   in staff.php just below add:   include "sglobals.php";   add:   $_GET['remove']=(int) $_GET['remove'];   find:   default: index(); break   add above:   case 'reserve': reserve(); break;   find:   function index() { global $db,$ir,$c,$h,$userid,$set, $_CONFIG; $pv=phpversion();   just above add:   function reserve() { global $db,$ir,$c,$h,$userid,$set; if($ir['user_level'] != 2) { die("403"); } if($_POST['reserve']) { $rname=mysql_query("SELECT * FROM `reserved_names` WHERE `Rname` = '".$_POST['reserved_name']."'"); if(mysql_num_rows($rname)) { die("The username is already reserved or blacklisted. > [url='staff.php?action=reserve']Back[/url]"); }else{ $_POST['reserved_name']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['reserved_name']); mysql_query("INSERT INTO reserved_names VALUES('', '{$_POST['reserved_name']}')"); stafflog_add("Reserved The Username {$_POST['reserved_name']}"); die("Username Reserved! > [url='staff.php?action=reserve']Back[/url]"); } } if($_GET['remove']) { $rname=mysql_query("SELECT * FROM `reserved_names` WHERE `id` = '".$_GET['remove']."'"); if(!mysql_num_rows($rname)) { die("The username has already been removed. > [url='staff.php?action=reserve']Back[/url]"); }else{ mysql_query("DELETE FROM reserved_names WHERE id={$_GET['remove']}"); stafflog_add("Removed Username From Reserve List"); die("Username Removed From Reserve List! > [url='staff.php?action=reserve']Back[/url]"); } } print "<h3>Username Reserve</h3><hr /> <form action='staff.php?action=reserve' method='post'> Reserve Name: <input type='text' name='reserved_name' /> <input type='submit' name='reserve' value='Reserve Username' /></form>"; $rname=mysql_query("SELECT * FROM reserved_names"); print " <h3>Reserved Usernames</h3><hr /> <table width='70%' cellspacing='1' class='table'> <tr> <th width='25%'>ID:</th> <th width='50%'>Username:</th> <th width='25%'>Actions:</th> </tr>"; while($rn=$db->fetch_row($rname)) { print " <tr> <td>{$rn['id']}</td> <td>{$rn['Rname']}</td> <td>[url='staff.php?action=reserve&remove={$rn['][Remove][/url]</td> </tr>"; } print "</table>"; }   any bug please feel free to post up and ill try get them sorted This modification should also work with v1 with minimal/no editing.
  17. thanks dayo never thought you could do that it worked a dream thanks again it all dynamically updating now as i didnt want to use the javascript alternative as i think it adds code that you dont actually need and bulks the script up lol thanks again
  18. im building a gang mail box and only want it to show to members within that gang ive join these table together but 1 problem is that it still shows to every member in game could someone please help thanks $q=$db->query("SELECT m.*,u.*,g.* FROM gang_mail m LEFT JOIN users u ON m.gangid=u.gang LEFT JOIN gangs g ON g.gangID=u.gang WHERE m.gangid=g.gangID ORDER BY time DESC LIMIT $page,1");   <--------------EDIT-------------> i think might have fixed it i used this sql instead $q=$db->query("SELECT m.*,u.*,g.* FROM gang_mail m LEFT JOIN users u ON u.userid='".$ir['userid']."' LEFT JOIN gangs g ON g.gangID=u.gang WHERE m.gangid=g.gangID ORDER BY time DESC LIMIT $page,10"); tell me fi you see any flaws in it thanks
  19. yh i know how to echo the message out but the problem is after the mysql update and the msg has echoed on the page the value that was update into database dont update on the php page till the page is refreshed example current username: demo change the username to: test and after the mysql query gos through the value stay the same on the page till next page refresh is it possible to make the value on the page update strait after the query without using like header location and the refresh function as i need to return a message to the php page after the update
  20. ok the problem im having is with preferences ive edited it so it returns a message on same page say i post some data like a new username the php dont update till next page refresh as im sending back a msg that prints out aswell like so $msg ="Username Changed!!"; <?echo$msg?> is there anyway to make the php update aswell after the query has been inserted into the database more like dynamic php varibles really
  21. yeah it has done the urls auto but the links still work like home?login but i want it to redirect auto to the new url home/login.php
  22. lol didnt read that part thanks but only think ive done it now but how do you redirect the old url to the new mod rewrite url as i dont want users using the old links but the new ones is it actually possible as ive tried nearly everything to do it but nothing works
  23. yes i know using htaccess stated at the very top im just saying is it a good idea to be using url rewrite please could you read my post first
  24. yeah that true but my main pages are not single either they are formatted like http://domain.com/home.php?login http://domain.com/home.php?signup http://domain.com/home.php?contact http://domain.com/home.php?tos so on
  25. hello i am currently making my own personal game engine for my own game and was wondering is url rewriting a good idea as i wanted to do something like this http://domain.com/files/login.php to http://domain.com/login.php i know how to do all this but just wondering would it be a good idea along with some rewriting that is seo friendly like http://domain.com/index.php?p=medals to http://domain.com/index/medals.php could someone please give me some good advice on this and if it is a good idea thanks
×
×
  • Create New...