-
Posts
3,368 -
Joined
-
Last visited
-
Days Won
126
Content Type
Profiles
Forums
Events
Everything posted by Dave
-
It'd be really awesome to have the NPC's randomly attack other players. Would make no player safe (in theory). Build some logic to find players that would be fair to attack, we don't wanna start randomly killing low level players. Then "simulate" the attack and push an event to that user on the outcome. You could either build this into a cron that runs every 30 minutes or so, or potentially build it into the user requests on the page, but this would mean the NPC's are dead when their are no users online.
-
Would be good to post up your solution just in case others have the same problem.
-
Razor42 - Mafia Law Template.
Dave replied to W3Theory || Peter's topic in Collaboration Experiences
Indeed so! Everyone just wants to make a quick buck of other peoples skills. It's rather aggravating. -
Your PM is working now! Just sent you a.. nice message.
-
Timestamps and crons are wildly different things. Sometimes it'd needed to have a very frequent cron, but for something like counting down minutes it's a bit stupid as timestamps exist. Crons can be great if you're wanting to export all orders at a certain time, or do a mass update on a lot of data at once. There's a nice discussion about this here: http://makewebgames.io/showthread.php/31481-Crons-VS-Time-Stamp (Niceness of thread not guaranteed, I skimmed over it.)
-
Getting a good understand of OO PHP (http://code.tutsplus.com/tutorials/object-oriented-php-for-beginners--net-12762) is a definite plus if you're going to pursue a career in web development. As Angel! has already said getting your head around some of the popular scripts around the internet is a real bonus and will enable you to work on basically any system. Wordpress if you're wanting to go down more brochure sites which can be a bit boring as they're mainly front end with little functionality. Systems like OpenCart (http://www.opencart.com/), Prestashop (http://www.prestashop.com/en/home) and Magento (http://magento.com/) are a lot more interesting and could lead to a career in ecommerce which is currently rapidly growing. I personally would suggest Magento but it's rather backwards but has been a great learning experience. It'd be really beneficial as well to keep up to date with some of the "newer" development languages/tools such as Node.js, Symfony, Laravel. Did you want to develop what you're doing into a career? There are loads of junior positions going around which could really benefit you. I got my current job through an apprenticeship and it's one of the most rewarding experiences I've had.
-
Razor42 - Mafia Law Template.
Dave replied to W3Theory || Peter's topic in Collaboration Experiences
I love how he's trying to obtain a valid McCodes V2 licence for a invalid licence of a stolen template. Rather bizarre. -
Could you build me a template ;) Vouch for !Angel, great guy. Talented developer.
-
Sounds like he's looking to build a native app. Certainly sounds like an interesting project. How are you planning the game play to be?
-
If you use something like PDO you can secure the variables when you bind them. MySQLi also offers similar functionality. Considering the MySQL PHP extension is actually deprecated as of version 5.5.0 http://www.php.net/manual/en/intro.mysql.php Check out these links: http://uk3.php.net/manual/en/intro.pdo.php http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers
-
Giving rewards for staying in the same gang every 50 days
Dave replied to dnenb's topic in General Discussion
Good time to learn your arithmetic operators! http://www.php.net/manual/en/language.operators.arithmetic.php [TABLE=class: doctable table, width: 1029] [TR] [TH=bgcolor: #BBBBDD]Example[/TH] [TH=bgcolor: #BBBBDD]Name[/TH] [TH=bgcolor: #BBBBDD]Result[/TH] [/TR] [TR] [TD]-$a[/TD] [TD]Negation[/TD] [TD]Opposite of $a.[/TD] [/TR] [TR=bgcolor: #E3E3F1] [TD]$a + $b[/TD] [TD]Addition[/TD] [TD]Sum of $a and $b.[/TD] [/TR] [TR] [TD]$a - $b[/TD] [TD]Subtraction[/TD] [TD]Difference of $a and $b.[/TD] [/TR] [TR=bgcolor: #E3E3F1] [TD]$a * $b[/TD] [TD]Multiplication[/TD] [TD]Product of $a and $b.[/TD] [/TR] [TR] [TD]$a / $b[/TD] [TD]Division[/TD] [TD]Quotient of $a and $b.[/TD] [/TR] [TR=bgcolor: #E3E3F1] [TD]$a % $b[/TD] [TD]Modulus[/TD] [TD]Remainder of $a divided by $b.[/TD] [/TR] [/TABLE] -
Giving rewards for staying in the same gang every 50 days
Dave replied to dnenb's topic in General Discussion
My code checks that the variable is divisible by 50. Unless I've missed something obvious here that would be every 50 days providing the variable goes up by 1 every day. -
Giving rewards for staying in the same gang every 50 days
Dave replied to dnenb's topic in General Discussion
If it's every 50 days why not just use if($row['gdays'] %50 == 0) -
Revert your changes to the scrollBottom(); function and then comment out where it's called just after the Ajax request. Then add this in <script /> tags $(document).ready( function() { scrollBottom(); });
-
Pretty simply! Open up chat_globals.php and find the function scrollBottom() and comment out it's contents (don't remove the function entirely). function scrollBottom() { //$('.chat_box').each(function() { // $(this).children('.chat_contents').scrollTop($(this).children('.chat_contents')[0].scrollHeight); //}); } Kinda thing
-
mccode-v2 Integrate GoInstant - Real Time Chat Widget
Dave replied to sniko's topic in Free Modifications
More looks like the chat message element has a text-align: justify; on it. Try overriding the styles and see if you can stop that. -
Some screenshots and a demo would really benefit your post. Surely the admin centre is a really critical part of this system to add in new content?
-
"PHP table values"... are you referring to a database table? I'm still confused what you're asking. It seems more like you're wanting to load a PHP array into Javascript. If so you'll probably want to look into JSON: http://www.caveofprogramming.com/frontpage/articles/php/php-json-an-example-javascript-json-client-with-php-server/
-
As the chat is loaded on every page so you'll need those variables it's probably more efficient to join in the $ir query anyway. Providing you setup your foreign keys correctly!
-
Dave Macaulay (real name!) - I'm a back & front-end developer working at a specialist ecommerce agency called Gene Commerce. My main focus is generally Magento but I always get thrown random Wordpress, OpenCart and bespoke systems to work with. I love playing around with new technologies utilizing them to build better applications for the end user. Who doesn't love a bit of canvas eh?
-
Didn't actually think about doing it like this Kyle. Good shout! You could even setup multiple variables in the user table 'global_chat','trade_chat' and then add that as a requirement.
-
Do you mean like leave a chat room?
-
mccode-v2 Integrate GoInstant - Real Time Chat Widget
Dave replied to sniko's topic in Free Modifications
Looks really interesting! Looks like they've done the majority of the hard work already so it's really just plugging it in. I'm going to guess as this already includes a chat widget really cutting down on development time. -
This is really simple. Add a new field into the users table (or you could create another table so you're not clogging up the users table). Then create a function which updates that field when a user completes that action. Then whenever someone is viewing a page/completing an action you want to be viewed by other players called the function with the string you want displayed.