Jump to content
MakeWebGames

Carnage

Members
  • Posts

    13
  • Joined

  • Last visited

Carnage's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. It should work on V1 also but not 100% sure. There are may ways to do it. One way. This way updates the database. <?php session_start(); $demo="demo"; $dempass="Demo"; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $uq=$db->query("SELECT userid FROM users WHERE login_name='$demo' AND `userpass`=md5('$dempass')"); if ($db->num_rows($uq)==0) { die("<h3>{$set['game_name']} Error</h3> Invalid username or password! <a href=login.php>> Back</a>"); } else { $_SESSION['loggedin']=1; $mem=$db->fetch_row($uq); $_SESSION['userid']=$mem['userid']; $IP =$_SERVER['REMOTE_ADDR']; /* Use this to update the demo stats and other things $rand_money=rand(1,10)*100; $rand_cr=rand(1,5)*10; $rand_stat=rand(1,5)*20; $db->query("UPDATE users u JOIN userstats us SET u.lastip_login='$IP',u.last_login=unix_timestamp(), u.money='$rand_money' ,u.crystals='$rand_cr', us.strength='$rand_stat', hospital=0,jail=0, us.agility='$rand_stat' ,us.guard='$rand_stat' WHERE u.userid={$mem['userid']}"); */ $db->query("UPDATE users SET lastip_login='$IP',last_login=unix_timestamp() WHERE userid={$mem['userid']}"); if($set['validate_period'] == "login" && $set['validate_on']) { $db->query("UPDATE users SET verified=0 WHERE userid={$mem['userid']}"); } header("Location: loggedin.php"); } ?>   This also works but does not update the demo info. <?php session_start(); $_SESSION['loggedin']=1; $_SESSION['userid']=2; header("Location: loggedin.php"); ?>   Name the file what you like and add a link on you login or registration page. Not a big addition but can help.
  2. Re: [Mccode V2]Guest as NPC[$25]   Yes I also have a one click Demo account. This is for NPC to fight back with the players. I am working this in with another mod where NPC take a larger role in the game world.
  3. Let guest take the role of one of your games NPC's . With this mod NPC's are no longer static. You add a link to your login page that a visitor can click to take control of a random NPC. With the NPC they can attack or mug random players. They can also train the NPC's stats. Limits are in place and can be edited to to your specs. The cost is $25 if you are interested PM ore email me at [email protected] Screen shots Attack Page NPC Gym Mug NPC Main Page
  4. Re: Making a perfect demo account!   Yea I know the div is not going to work for all lol I also over looked your other post. I use something like that in my own cod for other things. I guess I over looked it for this.
  5. Re: Making a perfect demo account! I use if($userid==2) { die("<div class=\"maincon\">You can not use this on a demo account sorry.</div>"); } I put it in mail, forum and few other pages. I also added a link to the login page <a href="demo.php"> and demo.php is just authenticate.php with the demo name and password hard coded in it so a users does not have to login they just click a link.
  6. Re: [mccode v2]Sniper Mod[$15]   As of now it has no in game cost. There is a chance for an event if they miss.
  7. Re: [mccode v2]Sniper Mod[$15]   This was my first mod I did not know how to price it. I do not think $15 is too bad I am adding more to it and the $15 covers any upgrades I do at no extra cost.
  8. Re: [mccode v2]Sniper Mod[$15]   I did not know what to charge. So I randomized the price. I put 5 prices in an array 5-25 in muti of 5 and 15 came up.
  9. Re: [mccode v2]Sniper Mod[$15] I can not change my screen size to give a better view.
  10. This is a mod that lets users kill users without attacking. The target is random. One of the things I liked about GTA games(Grand Theft Auto) was getting up high in the city and shooting others with a sniper rifle. Now your users can fill like a god by killing other users secretly with this mod. The price is $15 with free upgrades of this mod. $10 with no upgrades. More mods to come.
  11. Re: Maximum amt If the max is 147483647 you need to change INT in your database to BIG INT this should give you a larger max amt
  12. Re: Hospital/Jail Time v2   It is not an exact amount. You can replace this part rand(20,40)+floor($ir['level']/8); with an exact amount if you like.
  13. Re: Preventing Javascript on User comments and User Signatures Well I was just letting you know it could be put in it. Sorry to be annoying.
×
×
  • Create New...