Hitman 25 Posted May 27, 2010 Share Posted May 27, 2010 Hi,im looking for a hit rule for my game like you can only it this person 5 times an hour.If you got this mod please post it up please : ) thanks,Hitman 25 Quote Link to comment Share on other sites More sharing options...
Jordan Palmer Posted May 27, 2010 Share Posted May 27, 2010 I have no idea what you're talking about Also this should be in Wishes for new plugins.. Quote Link to comment Share on other sites More sharing options...
gurpreet Posted May 27, 2010 Share Posted May 27, 2010 Hitman have you ever tried to make anything or do you just come here and request everything in the WRONG sections? Heres a hint how to make it: Make a cron hour that resets the hits Make an if statement so if someone has attacked the same person 5 times in one hour they get an error. Quote Link to comment Share on other sites More sharing options...
sniko Posted May 27, 2010 Share Posted May 27, 2010 No need for a cron in my opionion, do: in a new column on the users table do, last attacked and enter the hour using the date function then in a seperate column do all the users they have attacked within the hour, search through that column using explode() and see if their userid appears 5 times then display the message "you cannot attack [username] within the hour, 5 times". Then create an if statement in header/globals.php, if($ir['lastattacked'] != date('g')) ... then reset the values to null on both columns. Thats what i would do ;) - sniko Quote Link to comment Share on other sites More sharing options...
gurpreet Posted May 27, 2010 Share Posted May 27, 2010 No need for a cron in my opionion, do: in a new column on the users table do, last attacked and enter the hour using the date function then in a seperate column do all the users they have attacked within the hour, search through that column using explode() and see if their userid appears 5 times then display the message "you cannot attack [username] within the hour, 5 times". Then create an if statement in header/globals.php, if($ir['lastattacked'] != date('g')) ... then reset the values to null on both columns. Thats what i would do ;) - sniko I showed the bare bones/simple one. Your way is much more effective but requires Hitman learning something for once Quote Link to comment Share on other sites More sharing options...
sniko Posted May 27, 2010 Share Posted May 27, 2010 I see, Anyway, Both ways will work, in theory, gurpreet and my own Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 27, 2010 Share Posted May 27, 2010 Why add into header? Just add into attack.....? And if you run it on a cron, people could just attack manically just as the cron ticks over. Also, how can you fit 5 attacks in an hour anyway, surely the user is put into hosp for minimum of 20 minutes? Or something? lol Quote Link to comment Share on other sites More sharing options...
gurpreet Posted May 27, 2010 Share Posted May 27, 2010 Why add into header? Just add into attack.....? And if you run it on a cron, people could just attack manically just as the cron ticks over. Also, how can you fit 5 attacks in an hour anyway, surely the user is put into hosp for minimum of 20 minutes? Or something? lol Hitman may have edited the hospital times to be low, like hospitalising is 50 minutes and leaving may be 2-5. Quote Link to comment Share on other sites More sharing options...
Equinox Posted May 27, 2010 Share Posted May 27, 2010 Ah, so as realistic as possible? xD Quote Link to comment Share on other sites More sharing options...
Spudinski Posted May 28, 2010 Share Posted May 28, 2010 [infobox]Thread Moved[/infobox] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.