Jump to content
MakeWebGames

looking for a hit rule


Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...