
Newbie
Members-
Posts
289 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Events
Everything posted by Newbie
-
thanks angel for the share :) from the screenies i seen looks nice will put up a demo soon for the lazy people :p
-
Thanks angel yep there not many left but there is some :)
-
This is my first free mod for grpg any issues or that post here and ill fix them. SQL First ALTER TABLE `grpgusers` ADD `booze` int(20) NOT NULL default 0 CREATE TABLE IF NOT EXISTS `planning` ( `id` int(20) NOT NULL AUTO_INCREMENT, `userid` int(20) NOT NULL DEFAULT '0', `type` varchar(255) COLLATE latin1_general_ci NOT NULL DEFAULT '', `time` int(50) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS `hideouts` ( `id` int(20) NOT NULL AUTO_INCREMENT, `userid` int(20) NOT NULL DEFAULT '0', `hideoutlvl` int(20) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `mymaterials` ( `id` int(20) NOT NULL AUTO_INCREMENT, `userid` int(20) NOT NULL DEFAULT '0', `itemid` int(20) NOT NULL DEFAULT '0', `howmany` int(20) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=8; CREATE TABLE IF NOT EXISTS `materials` ( `id` int(20) NOT NULL AUTO_INCREMENT, `material_name` varchar(255) COLLATE latin1_general_ci DEFAULT '', `material_price` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=8 ; INSERT INTO `materials` (`id`, `material_name`, `material_price`) VALUES (1, 'Heavy Duty Bag', 200), (2, 'Rubber Bands', 60), (3, 'Oranges', 10), (4, 'Fruit Cocktail', 500), (5, 'Sugar Cubes', 100), (6, 'Ketchup', 80), (7, 'Water', 0); hideout.php <?php include('header.php'); $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? strtolower(trim($_GET['action'])) : null; switch($_GET['action']) { case "buy": buy_materials(); break; case "start": start_brewing(); break; default: prison_officer(); break; } function prison_officer() { global $user_class; ?> <tr><td class='contenthead'>Prison Officer</td></tr> <tr><td class='contentcontent'> <?php $select = mysql_query("SELECT `id`,`userid`,`hideoutlvl` FROM `hideouts` WHERE `userid` = ".$user_class->id); $row = mysql_fetch_array($select); if($row['userid'] == $user_class->id) echo Message('You already have a hideout'); ?> <p>So you wanna buy this cell well give me a offer.</p> <form method='post'> <input type='text' name='amount' /> <input type='submit' name='bribeguard' value='Bribe' /> </form> <?php if($_POST['bribeguard']){ $bribe = round(1000 * 10 / 5); $lose = .03; $newmoney = $user_class->money - $_POST['amount'] * $lose; $newmoney1 = $user_class->money - $_POST['amount']; $_POST['amount'] = isset($_POST['amount']) && ctype_digit($_POST['amount']) ? abs(intval($_POST['amount'])) : null; if($user_class->money == 0) { echo Message('You dont have any money'); } if(empty($_POST['amount'])) { echo Message('Invalid Format'); } if($_POST['amount'] < $bribe) { mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney."' WHERE `money` > 0 AND`id` = '".$user_class->id."'"); echo Message("HAHAHA what do you call that. you lose 3% of your money."); } else if($_POST['amount'] >= $bribe) { mysql_query("UPDATE `grpgusers` SET `money` = '".$newmoney1."' WHERE `id` = '".$user_class->id."'"); mysql_query("INSERT INTO `hideouts` (`userid`, `hideoutlvl`)"."VALUES ('".$user_class->id."', '1')"); echo Message('You paid $'.number_format($_POST["amount"]).'<br /> The guard likes the bribe and gives you the hideout.'); } } ?> </td></tr> <?php } function buy_materials() { global $user_class; ?> <tr><td class='contenthead'>Cell Mates</td></tr> <tr><td class='contentcontent'> <p>You ask arround for some of the materials you need to start brewing.</p> <?php $select = mysql_query("SELECT `id`,`material_name`,`material_price` FROM `materials` ORDER BY RAND()"); if(mysql_num_rows($select)) { $row = mysql_fetch_array($select); $select2 = mysql_query("SELECT * FROM `mymaterials` WHERE `itemid` = ".$row['id'].""); $row2 = mysql_fetch_array($select2); echo " ".$row['material_name']." <br /> $".number_format($row['material_price'])." <form method='post'><input type='submit' name='buymaterial' value='Buy' /></form>"; } if(isset($_POST['buymaterial'])) { if($row['id'] == $row2['itemid']) { echo Message('You already have one of those only 1 at a time.'); } if($row['material_price'] > $user_class->money) { echo Message('You dont have enough money for '.$row['material_name'].'.'); } else { echo Message('You have purchased '.$row['material_name'].' for $'.number_format($row['material_price']).''); mysql_query("UPDATE `grpgusers` SET `money` = `money` - '".$row['material_price']."' WHERE `id` = '$user_class->id'"); mysql_query("INSERT INTO `mymaterials` (`userid`, `itemid`, `howmany`)"."VALUES ('$user_class->id', '".$row['id']."', '1')"); } } ?> </td></tr> <?php } function start_brewing() { global $user_class; ?> <tr><td class='contenthead'>Welcome to your hideout.</td></tr> <tr><td class='contentcontent'> <table width='100%'> <tr> <td> <?php $select = mysql_query("SELECT * FROM `materials`"); while($row = mysql_fetch_array($select)) { $select2 = mysql_query("SELECT * FROM `mymaterials` WHERE `itemid` = ".$row['id']." AND `userid` = ".$user_class->id.""); $row2 = mysql_fetch_array($select2); if($row['id'] == $row2['itemid']) { echo Message('You set everything up and start brewing up some booze.'); mysql_query("INSERT INTO `planning` (`userid`, `type`, `time`)"."VALUES ('$user_class->id', 'Fruit Punch', 168)"); mysql_query("DELETE FROM `mymaterials` WHERE `userid` = ".$user_class->id); } else { echo Message('You dont own the required items'); } } ?> </td> </tr> </table> </td></tr> <?php } ?> Open up classes and add $this->booze = $worked['booze']; and last the cron file i used a file but if you want you could add it into rollover.php if you feel up to it :) <?php if(!isset($_GET['code']) || $_GET['code'] != 'ENTER CODE HERE') exit; include('dbcon.php'); include('classes.php'); $result = mysql_query("SELECT `id`,`rmdays`,`booze` FROM `grpgusers`"); while($line = mysql_fetch_array($result)) { $user = new User($line['id']); $select = mysql_query("SELECT * FROM `planning` WHERE `userid` = ".$user->id); $worked = mysql_fetch_array($select); $select2 = mysql_query("SELECT `hideoutlvl` FROM `hideouts` WHERE `userid` = ".$user->id); $worked2 = mysql_fetch_array($select2); if($worked['time'] > 0) { mysql_query("UPDATE `planning` SET `time` = `time` - 24 WHERE `time` > 0 AND `userid` = ".$user->id); echo Message('Success Cron has worked 24 hours have been taken off your time.'); } if($user->rmdays > 0) { $increase = 1; } else { $increase = 0; } if($worked['time'] < 1) { $units = round(20 * $worked2['hideoutlvl'] * $increase); mysql_query("UPDATE `grpgusers` SET `booze` = `booze` + $units WHERE `id` = ".$user->id); Send_Event($worked['userid'], "After a long wait your booze is complete. You made $units booze."); mysql_query("DELETE FROM `planning` WHERE `time` < 1"); } } ?>
-
looking good razor :P
-
sellweed.php <?php include(__DIR__.'/globals.php'); switch($_GET['action']) { case 'sell': sell_weed(); break; default: index(); break; } $_POST['amount'] = isset($_POST['amount']) && ctype_digit($_POST['amount']) ? abs(@intval($_POST['amount'])) : null; function index() { global $ir,$h; if(empty($amount)) echo "You did not enter a valid amount."; $h->endpage(); if($ir['ounces'] != $amount) echo "You dont have that many ounces."; $h->endpage(); echo "<h2>Shady Stranger</h2>"; echo "Here you can sell your weed for a profit.<br /> Amount of weed: <input type='text' name='amount' value='{$ir['ounces']}'/> <a href='sellweed.php?action=sell'><input type='button' value='Sell Weed'></a>"; } function sell_weed() { global $ir,$db,$userid; $profit = 100 * $ir['level']; $amount = $_POST['amount']; $newprof = $profit * $amount; if($ir['ounces'] != $amount) { echo "You dont have that many ounces."; $h->endpage(); } else { $db->query("UPDATE `users` SET `money` = `money` + {$newprofit},`ounces` = `ounces` - ".$_POST['amount']." WHERE `userid` = '$userid'"); } } ?> might be a bit buggy untested
-
small update of grow setup it now inserts into the database and uses a cron file now
-
Free hosting : http://x10hosting.com/ x10 is a pretty good host iv used them for quite a while iv also got there paid hosting only shared tho they also offer vps
-
what annoying me is grants still not released it lol i couldn't care about legal ****
-
thanks for the comments guys :)
-
thanks for the comment kyle the classes are pretty easy to change just a edit to the array in register.php and the sql file then just change the pages as you please.
-
Hello this is my first mod for grpg here is some info on it A player can pick from 5 classes upon register each class will have benefits through the game which will be listed below. Files: buydrugs.php crime.php gym.php mug.php register.php 1 sql file and 2 text files every file has been modified and secured. # characters & Perks # Mastermind -> 3% extra strength gain when training at gym -> 3% extra defence gain when training at gym -> 2% extra speed gain when training at gym Assassin -> 10% extra strength gain when training at gym -> 2% extra speed gain when training at gym -> 1% extra defense gain when training at gym Bodyguard -> 10% extra defence gain when training at gym -> 2% extra speed gain when training at gym -> 3% extra strength gain when training at gym Smuggler -> 10% extra speed gain when training at gym -> 2% extra defence gain when training at gym -> 1% extra strength gain when training at gym -> 5% more earnings from selling there weed Thief -> 10% extra speed gain when training at gym -> 2% extra strength gain when training at gym -> 1% extra defense gain when training at gym -> 5% extra cash when mugging people -> +5 exp and cash from every crime Paypal: [email protected] Daily Email: [email protected] you can see a working demo here http://www.crimecityrpg.co.uk Username: demo Password: demo123 there is a option to change class there aswell for testing out the mod if you find any bugs or that post them to my daily email.
-
testers needed for new mod beta testing...
Newbie replied to Uridium's topic in Requests & In Production
sure will help as much as i can skype is linked to my profile -
i keep all my images in 1 folder but have sub folders for other categories makes things much easier when coming back to add/delete things images weapons armour donator etc
-
Picture is a bit crap but open up your cpanel and look for perm it should have numbers next to it like 755 if you have your game in a folder make sure the folder is writable 755 [ATTACH=CONFIG]1258[/ATTACH]
-
it can be done yes i have seen it done on torn.com not to sure on how to do it.
-
if i remember right ravens script already has crimes done check the sql for the formulas and test them out yourself or just create a custom crimes page for your game me personally hate mccodes crime page
-
mccodes v1 is free can be downloaded for free mccodesv2 is $100 and redux is $120 if you don't own a valid license for mccodes v2 and up there is a chance your game can get shut down just a heads up
-
yeh its mccodes just with a stolen layout i have read some place you need a pretty decent host to run it uses a lot of resources on shared hosting
-
if this is what ya mean then ill start you off. Tizag is a good site to learn from used it quite alot CREATE TABLE `pets` ( `userid` int(11) NOT NULL auto_increment, PRIMARY KEY (`userid`) ) ENGINE=MyISAM ;
-
i can see where his error is coming from line 25 after END; he has a couple spaces followed by a } but i tried it with yours and no luck sorry did you hire someone to create custom a layout for you ?if so were you getting this error before or after </form> END; }
-
some screenshots for the lazy people ignore the black spaces been playing about with my css its not part of the modification [ATTACH=CONFIG]1189[/ATTACH]
-
if you play gta v online ps3 add me XxGetty2k12xX
-
Recoded version can be found at op with a code version a pastebin version and downloadable version if any bugs or that post here ill get right on it going to start working on v1.02 tonight or tomorrow
-
if your still stuck after what kyle has said then read this it will help you understand better i hope it did help me i didn't have a clue what kyle was talking about until i read this and the comments http://stackoverflow.com/questions/8400018/syntax-error-unexpected-t-encapsed-and-whitespace-expecting-t-string-or-t-vari