Jump to content
MakeWebGames

Nicholas

Members
  • Posts

    467
  • Joined

  • Last visited

Everything posted by Nicholas

  1. i dont know how to do left or right join seleting yet, never tried learning it lol. but its all sorted now. but thanks for the artical, i might try learning left or right joining query lol. just ive never used it in any mods ive edited or created.
  2. words: 1,387 characters (without spaces): 13,450 characters (with spaces): 14,501 paragraphs: 463 lines: 538 completion of mod: about 35% this is gonna be one big ass mod lol. never made massive mod before ^^
  3. got it, works fine now. had to edit that little script little tho lol. apart from that thanks for helping me sort one out :) im about 40% done on my 1 of a kind mod :P
  4. think so. can anyone help me create this modification script? this probably wouldnt work (wrote it on here) but maybe you find out what i mean... <?php $collect = mysql_query("SELECT `userid` FROM `users`"); $userid = mysql_fetch_array($collect); INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('$userid', '0', '0', '0', '0'); ?> and say i have 40 users on my game, would it insert into table "ballplayer" like this? INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('1', '0', '0', '0', '0'); INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('2', '0', '0', '0', '0'); INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('3', '0', '0', '0', '0'); INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('4', '0', '0', '0', '0'); INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('5', '0', '0', '0', '0'); so on upto INSERT INTO `ballplayer` (`userid` ,`balls` ,`throws` ,`hits`, `misses`) VALUES ('40', '0', '0', '0', '0'); then stop? and everyone in the game have their own personal section on that table. as the mod im gonna try and create uses a lot of sections in the table and i dont want to put it all in users table. NOTE: thats just an example table lol. could come up with a mod for this table information i just put here. lol.
  5. there was a script out there that selects how many users you got in the game and then inserts information into the new table automaticly i dont want to do INSERT INTO `blah` (`userid` ,`blah` ,`blah` ,`blah`) VALUES ('1', '0', '0', '0'); INSERT INTO `blah` (`userid` ,`blah` ,`blah` ,`blah`) VALUES ('2', '0', '0', '0'); INSERT INTO `blah` (`userid` ,`blah` ,`blah` ,`blah`) VALUES ('3', '0', '0', '0'); INSERT INTO `blah` (`userid` ,`blah` ,`blah` ,`blah`) VALUES ('4', '0', '0', '0'); over 1000 times. thats just long lol, there was a script that does it all for you in secounds but i cant think of how to create that script.
  6. hi im trying to create a new mod but i require little help on the sql, what im trying to do is create new database table but with different effect... what it does is say i create table saying: catcher (eg. announcements) and in that table there is sections saying: userid throws catches fails NOTE: these are just an example, its nothing to do with the mod im gonna try make. how can i set it up so there is the same amount of catagories as the users tables, so every user in the game has a slot if you understand what i mean... i cant think of how to explain it :( if you understand and can help me on the script or whatever is required to insert the information into the database section it be very greatful NOTE: can you use the example table and catagories and ill change the information to create the table i need i havnt though of the table names and etc yet why im using an example. thanks Nicholas.
  7. My game is hosted on google servers ;) I still don't think it can handle 10 million signups in just a few seconds. Besides, it would become very expensive for me.   Edit: btw guys, I don't think nicholas meant the 10 mil literally :P lol, nope didnt mean literally 10 million users in secounds but i can do good few hundred in few secounds. just saying. lol. best way to stop that mutliple accoumt sign-up hack is to use a capthca. and the auto admin thing is to change $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; into $ip = $_SERVER['REMOTE_ADDR'];
  8. You want me to show you how i did it? yeh, because im thinking about doing it on my game :P
  9. can you show me a demontration of how you done your CSS and coding bit please? i dont think my verison would work...
  10. it might be fixed but thats not secure Mattrew there is 2 hacks i know that could work on this register.php page. 1. auto admin 2. register 10 million users in secounds.
  11. be something like this wouldnt it? sprry if its wrong, also you have to sort css image thing out, ive tried to mark what to do.   print "<style type=text/css> <!-- a.swap1 { background-image:url(normal_attack_image_here1.jpg); } a.swap1:hover { background-image:url(hoved_attack_image_here2.jpg); } a.swap2 { background-image:url(normal_mail_image_here1.jpg); } a.swap2:hover { background-image:url(hoved_mail_image_here2.jpg); } a.swap3 { background-image:url(normal_cash_image_here1.jpg); } a.swap3:hover { background-image:url(hoved_cash_image_here2.jpg); } a.swap4 { background-image:url(normal_contact_add_image_here1.jpg); } a.swap4:hover { background-image:url(hoved_contact_add_image_here2.jpg); } a.swap5 { background-image:url(normal_add_friend_image_here1.jpg); } a.swap5:hover { background-image:url(hoved_add_friend_image_here2.jpg); } a.swap6 { background-image:url(normal_add_enemy_image_here1.jpg); } a.swap6:hover { background-image:url(hoved_add_enemy_image_here2.jpg); } --> </style>"; print " [url='attack.php?ID={$r['][img=pp/au.png][/url] [url='mailbox.php?action=compose&ID={$r['][img=pp/sm.png][/url] [url='sendcash.php?ID={$r['][img=pp/sc.png][/url] [img=pp/break.png] [url='contactlist.php?action=add&ID={$r['][img=pp/ac.png][/url]"; if($ir['donatordays'] > 0) { print " [url='friendslist.php?action=add&ID={$r['][img=pp/af.png][/url] [url='blacklist.php?action=add&ID={$r['][img=pp/ae.png][/url]"; }   also what he said post up the images with the links to them to show us what you want to be normal and what the image to change too once you hover over the normal image.
  12. lol cheers, i remembered awhile back when i helped someone on their game and they had few the same lines which was at the bottom of the register page under the parts like them lines i posted if you know what i mean lol
  13. sorted thanks to guy on messages called Mattrew he said something about last 7 lines of the file and i just remembered something. its all fixed now.
  14. yeh kinda figured thats was the reason for $h->endpage; function as the endpage function is at end of header.php also this is a line for what i mean in register.php for example   if(file_exists('ipbans/'.$ip)) { echo "<font color=red size=-1><center>Your IP has been banned. There is no way around this.</center></font>"; exit; } the exit; bit pushing my layout out of its correct slot. also return; doesnt end a page does it? guess illl just have to put up with it i guess...
  15. hi, im wondering is there another way to end a page without using exit; $h->endpage; echo("blah"); as i cant use $h->endpage; in register,php or login.php some reason... even when i put $h in correct spot for example global $_config, $h; and if i use exit; or the other one this is what happens to my layout. normal page http://img713.imageshack.us/i/45313025.png/ page with exit; or other way http://img52.imageshack.us/i/52768617.png/ as you can see without the ending page function with exit; the page is fine but with the endpage function exit; it ruins my layout little, by pushing it to the right abit, which you can probably see... is there another way to end the page on sertain line without my layout going like that? if there is can you tell me please? thanks Nicholas
  16. yeh i know i dont have to add anything into users tables, thats why i need help i can figure out the formula for the unix_timestamp thing where the 60*60*168 bit is if you understand where im coming at lol. it help alot if someone could post up what to copy and paste into the cron file.
  17. hi, im wondering can anyone help me out little please? im trying to do modification where if your offline for certain amount of days for example 1 week you will lose you job. if its already been made can you give me the link please to it or tell me how to make it? ill be very greatful, thanks Nicholas. i do know a way to do it but i was wondering if there is a quick way to do it as i can add daysoffline to the users table ALTER TABLE users ADD daysoffline INT(11) NOT NULL DEFAULT 0; and add this in cron day   $db->query("UPDATE users SET daysoffline=daysoffline+1"); $db->query("UPDATE users SET jobrank=0, daysoffline=0 WHERE daysoffline=7");   and that add this to authication.php file $db->query("UPDATE users SET daysoffline=0 WHERE userid=$userid");   but im wondering if there is a easier way?
  18. if your trying to figure out what is similar to this, its on cronwerks forum, someone brought of a script that you add onto like globals.php and appently it will secure all your GET and POST in the game, but it doesnt really secure them i dont think, it just causes errors and glitches on the game on like for example, profile signatures...
  19. anytime lol, maybe someone could explain it in more detail, as im not good at explaining stuff haha.
  20. no... $r isnt for users gang lol $r = person your viewing for example, viewuser.php (someones profile, $r view their information like money and etc ($r['money'])) or userlist.php (list of players, $r view their username ($r['username']) or gender ($r['gender'])) and etc... $ir = you, wherever $ir is thats selecting your userid's information from the database. not quite sure how to explain it fully but the gang stuff is $gangdata but for selecting like a gang you have to do something like this SELECT FROM gangs (for users table it be "SELECT FROM users") which you can see its selecting information from the database section gangs and in that section there be a spot called gangID which is the main part of the gangs SQL (gangs ID) and to grab the players gang they have to do this gangID = {$ir['gang']} as you can see... $ir['gang'] is there and the player that is viewing that page it will select the the gangID on that players gangID number in the database as for example, say mines 17, it select the gangID 17 from the gangs database section so it be like gangID = 17 so the SQL query will be like mysql_query("UPDATE gangs SET blah=blah+1 WHERE gangID=17"); and that will update that gangs ID's whatever its set to update. dont worry i used to ask for help and crap all the time still do sometimes but not as much as i used too... everyone said stop asking for help all the time and try learning how to code which i was trying to do in the first place lol, but i guess i wasnt really showing it fully... but i cant learn quick lol, took me while to know as much i know by reading like Illisions and danny656's mods and other peoples, as im kinda a copy and learn type person lol. i cant learn stuff from like w3schools.com or php.net those sites are confusing for me.
  21. these addons for header.php, globals.php or wherever, they dont even work do they? i heard they do more damage to games with them on their lol. or have i heard wrong?
  22. :) its quite old mod i made, actually 1 of the first ones i did when i didnt have much knowledge (still dont but i know alot more now)
  23. yeh because when advertisers come to the game, they dont want to sit there for 10 minutes just to send 10 random players 1 message. they get annoyed of waiting and get bored so they leave, well most of them anyways haha.
  24. really no point in this as what if there is a sig maker on the game, they have to upload it to like photobucket or imageshack, they will need .com or .us if you think about it lol. best is just to do a system where you can only send 1 message every like 1 minute or whatever. so you can catch and fed them quickly without them over flowing the mail logs with their game link.   also this looks like Extermination's modification lol
  25. try this, not tested and im not professional nither so... it might not work... if you get a error remove a } at bottom of script <?php include (DIRNAME(__FILE__) ."/globals.php"); if($gangdata['gangRESPECT'] < 175) { echo'You need at least 175 respect or more for this upgrade. Please come back once you have the required gang respect.'; $h->endpage(); exit(); } if(!$gangdata['gangPRESIDENT']) { echo'Only the gang president can perform this action.'; $h->endpage(); exit; } else { if($gangdata['gangRESPECT']>=175) { mysql_query("UPDATE `gangs` SET `gangUPDATE` = `gangUPDADE` + 1, `gangRESPECT` = `gangRESPECT` - 150 ' WHERE `gangID` = {$ir['gang']}"); echo' Congratulation, Your gang now has been updated'; } } $h->endpage(); ?>
×
×
  • Create New...