-
Posts
572 -
Joined
-
Last visited
-
Days Won
7
Content Type
Profiles
Forums
Events
Everything posted by NonStopCoding
-
EDIT: Ok so got most of it fixed no errors showing up now but there is still the issue i cant post nothing comes up or errors nothing just says start chatting now the faction chat is working no problem this chat has been the worst thing iv had to convert in forever EDIT AGAIN: ok so furthermore looking into it the info is inserting into the database but not showing up on the chat that i created AND AGAIN: ok so the issue lies here i think WHERE `chat_channel` = ".$chat_data['channel_id']." it returns a error 1. General Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/nonstopc/public_html/rc/ajax_chat/chat_ajax.php on line 125 Start Chatting below! when i add a ' to the start of the ".$chat_data['channel_id']." and at the end the error goes away but no messages show up ok so i was right the issue is coming from here looks like its not pulling the channel id for some reason EDIT AGAIN LOL: i forgot to change the _row to _array lol why it was not pulling id
-
Because players are evil lol they would mug admins for large amount of cash if they were trying to test something if the person doesn't want it it could be easy removed
-
Ok so here is a simple mug feature for anyone who wants to use it. Add this to global_funcs.php function getuser($id) { global $db; $res = $db->query("SELECT `username` FROM `users` WHERE `userid` = '".$id."'"); $row = $db->fetch_row($res); return "<a href='viewuser.php?u={$id}'><span style='color:red'>".htmlentities($row['username'])."</span></a>"; } mug.php <?php include(__DIR__.'/globals.php'); $_GET['mug'] = isset($_GET['mug']) && ctype_digit($_GET['mug']) ? abs(intval($_GET['mug'])) : null; if(isset($_GET['mug'])) { if(empty($_GET['mug'])) { echo "Invalid Choice"; $h->endpage(); exit; } if($ir['brave'] < 10) { echo "Sorry but you dont have enough brave to mug someone you need 10"; $h->endpage(); exit; } if($ir['hospital'] || $ir['jail']) { echo "You cant mug someone if you are in jail or hospital."; $h->endpage(); exit; } $ucheck = $db->query("SELECT `u`.`userid`,`money`,`jail`,`hospital`,`location`,`user_level`, `us`.`agility` FROM `users` AS `u` INNER JOIN `userstats` AS `us` ON `u`.`userid`=`us`.`userid` WHERE `u`.`userid` = {$_GET['mug']} LIMIT 1"); if(!$db->num_rows($ucheck)) { echo "That user is not real."; $h->endpage(); exit; } else { $row = $db->fetch_row($ucheck); if($row['hospital'] || $row['jail']) { echo "".getuser($_GET['mug'])." cant be mugged while in jail or hospital."; $h->endpage(); exit; } if($ir['location'] != $row['location']) { echo "Sorry but this person is not in the same city as you."; $h->endpage(); exit; } if(in_array($row['user_level'], array(2))) { echo "Admins are blocked from being mugged."; $h->endpage(); exit; } $uchance = mt_rand(1,5); # 1 in 5 chance of success if($ir['agility'] > $row['agility'] && $uchance == 1) { $mugamount = round($row['money'] / 4); echo "You have successfully mugged ".getuser($_GET['mug'])." for ".money_formatter($mugamount).""; $db->query("UPDATE `users` SET `money` = `money` - '$mugamount' WHERE `userid` = {$_GET['mug']}"); $db->query("UPDATE `users` SET `money` = `money` + '$mugamount',`brave` = `brave` - 10 WHERE `userid` = {$ir['userid']}"); event_add($_GET['mug'], "You have been mugged by ".getuser($ir['userid'])." and stole ".money_formatter($mugamount).""); } else { echo "You failed to mug ".getuser($_GET['mug']).""; event_add($_GET['mug'], "".getuser($ir['userid'])." tried to mug you but failed."); $db->query("UPDATE `users` SET `brave` = `brave` - 10 WHERE `userid` = {$ir['userid']}"); } } } $h->endpage(); ?> and last add this to the users profile mine was done around line 187 (stranded viewuser) [<a href='mug.php?mug={$r['userid']}'>Mug User</a>]
-
it would not be that hard to add hit me up on skype if you want help
-
i actually think it looks pretty damn good for 56 hours work when i have time ill take a look around good job :)
-
you can add my psn if you wish XxGetty2k12xX Ps3 Ps4 COD Advanced Warfare (ps4) COD Blackops (ps3) COD Blackops 2 (ps3) Mainly play ps4 tho
-
i have only even released one game and that was when i was a total newb did not know anything and it was a illegal ravens script but yea the players stayed i have yet to release my grpg game so dunno i guess ill need to wait and see what happens
-
thats because your using a variable and no declaring it $soldiername would need to be $soldiername = mysql_real_escape_string($_POST['soldiername']); As you are using a post method for the soldiername you need to use the post variable $_POST['then the name value'] as you used soldiername
-
ok so i took the code and inserted it into a mccodes file replaced the header and footer replaced with with was needed for mccodes anyways there is no errors showing up on the main page it displaying fine for me ok for your inserting issue i was cleaning up the code a little and noticed this $query = "INSERT INTO soldier ('','owner', 'soldiername', 'soldierrank', '', '', '', '', '', '','','') VALUES('','$user_id', '$soldiername', '1', '', '', '', '', '', '','','')"; whats all the empty single quotes for if these have default values you don't need to add the single quotes also for a auto increment you don't need to add the ' ' for that as well `Test` int(10) not null default 0 also i have noticed you used ' instead of ` try the code below see if it helps $query = "INSERT INTO soldier (`owner`, `soldiername`, `soldierrank`) VALUES('$user_id', '$soldiername', '1')"; if soldierrank is set to default 1 in the sql table then there is no need to insert this info
-
With this module installed on your game your players will be able to set up a heist and invite other players to help them pass the heist. Each heist will have its own required power that will need to be met or the heist will be a failure. – Staff Side – Option to create heists with ease via a staff panel. Option to edit any heist with ease via a staff panel. Option to block your own words from shout box. – Player Side – Option to set up a heist. Option to invite players to heist. (Heist Leader only!) A simple shoutbox for your heist members to chat while they wait. Option to leave a heist at anytime. Option to clear shoutbox chat. (Heist Leader only!) Option to disband your heist. (Heist Leader only!) Each player has there own power which they contribute to the heist for example if you are a brand new player and just started out the game it would not be wise for you to go try a heist unless you know some pretty strong people willing to do it with you as you will only contribute 5 power to the heist as a newbie the power gain might be different depending on how your game has been customized. The users power is based on these important factors Level IQ New Customers use discount code N3W2015 for 25% discount http://nonstopcoding.com/?download=heists-module-v1-00
-
whats your sql structure for maps like? if it is something like above use the $userid or $ir['userid'] variables to update the maps when the user moves for example Your Map Location: 2, 2, You have 93 left. ok so in maps it would look something like this (well this is how i would do it) Location x Location y user each map would have its own location and a available user slot so user moves north from 2,2 which would be 3,2 i would do a check to see if that slot is empty if so then add the users id into it if not then some action like a fight or something for adding the users id to the table there is two ways it can be done both need to be global in the function $res = $db->query("SELECT `user` FROM `maps`"); while($r = $db->fetch_row($res)) { if(empty($r['user'])) { $db->query("UPDATE `maps` SET `user` = '$userid' WHERE `user` = 0"); } else { some action like fight } } Keeping this in mind you will need to remove the users id on move as well
-
So you want to add the users to the map table? example x = 11 y = 11 user = 0
-
[In Production] Heists Module
NonStopCoding replied to NonStopCoding's topic in Requests & In Production
Ok i am finally glad to announce that the heists module has been completed and will be up for sale on my website shortly but here is some info on the module as some has changed since last post. Staff Side . Option of adding Heists to the game . Option to edit any Heist in the game . Option to add your own blocked words for Shoutbox ( Thanks kyle for idea :P ) Player Side . Option to set up a Heist. . Each Heist has its own shoutbox. . Option to leave the Heist. . Option to Disband the Heist (Heist Leader) . Option to Complete Heist (Heist Leader) . Option to invite member to Heist. (Heist Leader) Each player has there own power which is calculated on somethings when a Heist leader sets up a heist his power is calculated and added to the heists total power this also happens when someone joins your Heist. If you wish to see it working in action then you can check out my mccodes developer site http://www.mcc.nonstopcoding.com Links Heists Page Planning Page -
Highest level is 8k wow iv seen quite a few games using that layout before
-
wicked layout loving the mascots
-
not to sure not seen the show in ages but from what i remember user picks a box to keep then they have to open other boxes and the banker will give him a offer players gets to choose or decline EDIT: i did find this tho http://www.dealornodeal.co.uk/show/game-rules/
-
haha you have a point but i am not selling him anything so i don't see the issue i asked if he wanted something similar
-
i am using a custom coded one that mtg did for me but i dunno i did noticed your pulling everything from the grpgusers twice $sql= "SELECT * FROM grpgusers WHERE username='$username'"; and when you initiate the users class this also pulls everything from the grpgusers table $user_class = new User($row['id']); you could alter the first one to pull id and password and salt which is all i see that is needed from first query
-
i can do you something similar but it wont be deal or no deal Basically user picks a box (1-10 (can be more if needed)) once a hour cron is run and a winner is selected.
-
Yea pete is amazing but not everyone can afford him if your budget is low then i would recommenced [MENTION=69001]Zettieee[/MENTION]
-
[In Production] Heists Module
NonStopCoding replied to NonStopCoding's topic in Requests & In Production
Here is some screenshots so far :) Coded in the shout box for heist Fixed some issues Added function to delete the heist chat logs if your the heist leader Still to come Do the heist Be able to cover fellow members for a heist but with lower payouts. Staff Panel [ATTACH=CONFIG]1723[/ATTACH][ATTACH=CONFIG]1724[/ATTACH][ATTACH=CONFIG]1725[/ATTACH][ATTACH=CONFIG]1722[/ATTACH][ATTACH=CONFIG]1726[/ATTACH][ATTACH=CONFIG]1727[/ATTACH][ATTACH=CONFIG]1728[/ATTACH][ATTACH=CONFIG]1729[/ATTACH][ATTACH=CONFIG]1730[/ATTACH] -
Np kyle :)
-
Hello i am in the process of creating another heists module but this time for mccodes and the way it is being done is different from my grpg version. Ok so here is what i have so far. Features Option to set up a heist Invite Page Heists Shout box Each Heist has a min members required and power Each Member has there own power which they contribute to the heist So far i have the main heists page which will show the heists in the game and how many members it takes to do the heist players can set up the heist they can goto there planning page and invite another player the player is then sent a event saying that the person has invited them to a heist with 2 links accept or decline. If the users declines the heist a event is sent to the heist leader to notify them and of course they are removed from the invites table If they choose to accept the heist then there power is added up and added into the heists total power and it updates a slot in the users table (like gangs) That is all i got up to for now but there will be more features added soon just wanted to know if anyone would be interested in this for mccodes
-
ok so the way the rc was done is stupid but there is database info at the top of the cron file which holds your data for connection to database you need to fill out the info with your db info ill wait for your reply on skype i have updated the cron file a little
-
Ok here goes :) You will need to change the ids in the arrays to match the items you wish to give the users same with the crystals and money. MySQL CREATE TABLE `claimed` ( `user` int(20) NOT NULL default 0, ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; dtemple.php <?php /* Module Name: Donation Temple * Module Version: v1.00 * Module Price: $0 * Module Support: [email protected] */ include(__DIR__.'/globals.php'); $_GET['action'] = isset($_GET['action']) && ctype_alpha($_GET['action']) ? strtolower(trim($_GET['action'])) : null; switch($_GET['action']) { case 'check': check_amount(); break; default: temple(); break; } function temple() { global $h; echo "<h2>Donation Temple</h2><hr width='50%'>"; echo "<i>Here you can spend your energy on rewards the more energy you donate the better the reward.</i>"; echo "Enter the amount of energy you wish to trade for a reward.<br /> <form method='post' action='dtemple.php?action=check'> <input type='text' name='amt' value='1' maxsize='3' title='Insert the energy you wish to trade' /> <button>Swap Energy For Rewards</button> </form>"; $h->endpage(); } function check_amount() { global $db,$ir,$h; $_POST['amount'] = isset($_POST['amount']) && ctype_digit($_POST['amount']) ? abs(intval($_POST['amount'])) : 0; if(empty($_POST['amt'])) { echo "Thats not right?<br /><a href='dtemple.php'>Back</a>"; $h->endpage(); exit; } $check = $db->query("SELECT `user` FROM `claimed` WHERE `user` = {$ir['userid']}"); if($db->num_rows($check)) { echo "You have already done your daily trade."; $h->endpage(); exit; } if($_POST['amt'] > 100) { echo "Sorry 100 energy is the max you can trade."; $h->endpage(); exit; } if($ir['energy'] < $_POST['amt']) { echo "Sorry but you don't have that much energy."; $h->endpage(); exit; } else { if($_POST['amt'] >= 1 && $_POST['amt'] < 15) { $chance = mt_rand(1,3); if($chance == 1) { $reward = mt_rand(100,5000); echo "You got ".money_formatter($reward)." for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`money` = `money` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 2) { $reward = mt_rand(1,10); echo "You have gained ".$reward." crystals for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`crystals` = `crystals` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 3) { # Add the items to the array that you want to show. $items = array_unique(array(1,3,4)); $itm = $db->query("SELECT `itmid`,`itmname` FROM `items` WHERE `itmid` IN(".implode(',',$items).") ORDER BY RAND() LIMIT 1"); $ret = $db->fetch_row($itm); echo "You got a {$ret['itmname']} for trading ".$_POST['amt']." energy"; item_add($ir['userid'],$ret['itmid'],1); $db->query("INSERT INTO `claimed` ('".$ir['userid']."')"); $h->endpage(); exit; } } else if($_POST['amt'] >= 15 && $_POST['amt'] < 26) { $chance = mt_rand(1,3); if($chance == 1) { $reward = mt_rand(5000,15000); echo "You got ".money_formatter($reward)." for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`money` = `money` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 2) { $reward = mt_rand(10,25); echo "You have gained ".$reward." crystals for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`crystals` = `crystals` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 3) { # Add the items to the array that you want to show. $items = array_unique(array(1,3,4)); $itm = $db->query("SELECT `itmid`,`itmname` FROM `items` WHERE `itmid` IN(".implode(',',$items).") ORDER BY RAND() LIMIT 1"); $ret = $db->fetch_row($itm); echo "You got a {$ret['itmname']} for trading ".$_POST['amt']." energy"; item_add($ir['userid'],$ret['itmid'],1); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } } else if($_POST['amt'] >= 26 && $_POST['amt'] < 51) { $chance = mt_rand(1,3); if($chance == 1) { $reward = mt_rand(15000,45000); echo "You got ".money_formatter($reward)." for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`money` = `money` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 2) { $reward = mt_rand(25,35); echo "You have gained ".$reward." crystals for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`crystals` = `crystals` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 3) { # Add the items to the array that you want to show. $items = array_unique(array(1,3,4)); $itm = $db->query("SELECT `itmid`,`itmname` FROM `items` WHERE `itmid` IN(".implode(',',$items).") ORDER BY RAND() LIMIT 1"); $ret = $db->fetch_row($itm); echo "You got a {$ret['itmname']} for trading ".$_POST['amt']." energy"; item_add($ir['userid'],$ret['itmid'],1); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } } else if($_POST['amt'] >= 51 && $_POST['amt'] < 76) { $chance = mt_rand(1,3); if($chance == 1) { $reward = mt_rand(45000,65000); echo "You got ".money_formatter($reward)." for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`money` = `money` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 2) { $reward = mt_rand(35,50); echo "You have gained ".$reward." crystals for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`crystals` = `crystals` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 3) { # Add the items to the array that you want to show. $items = array_unique(array(1,3,4)); $itm = $db->query("SELECT `itmid`,`itmname` FROM `items` WHERE `itmid` IN(".implode(',',$items).") ORDER BY RAND() LIMIT 1"); $ret = $db->fetch_row($itm); echo "You got a {$ret['itmname']} for trading ".$_POST['amt']." energy"; item_add($ir['userid'],$ret['itmid'],1); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } } else if($_POST['amt'] >= 76 && $_POST['amt'] < 101) { $chance = mt_rand(1,3); if($chance == 1) { $reward = mt_rand(65000,85000); echo "You got ".money_formatter($reward)." for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`money` = `money` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 2) { $reward = mt_rand(50,60); echo "You have gained ".$reward." crystals for trading ".$_POST['amt']." energy"; $db->query("UPDATE `users` SET `energy` = `energy` - ".$_POST['amt'].",`crystals` = `crystals` + '$reward' WHERE `userid` = {$ir['userid']}"); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } if($chance == 3) { # Add the items to the array that you want to show. $items = array_unique(array(1,3,4)); $itm = $db->query("SELECT `itmid`,`itmname` FROM `items` WHERE `itmid` IN(".implode(',',$items).") ORDER BY RAND() LIMIT 1"); $ret = $db->fetch_row($itm); echo "You got a {$ret['itmname']} for trading ".$_POST['amt']." energy"; item_add($ir['userid'],$ret['itmid'],1); $db->query("INSERT INTO `claimed` VALUES ('".$ir['userid']."')"); $h->endpage(); exit; } } } } ?> and last add this to your daily cron $db->query("TRUNCATE TABLE `claimed`"); Edit: i have not fully tested the module but any issues post em