Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-24-2006, 07:02 PM   #1 (permalink)
Rossi4218
Junior Member
 
Join Date: Mar 2006
Posts: 8
Default jail gaming code

Does any 1 no of any jail/ban codes for this project i am working on in colledge i need some hel to either make one or get one if u wana see my project so far please visit members.lycos.co.uk/hi118uk and register and hopefully you will see that i am not lying and that i really need this code

Last edited by Rossi4218 : 03-24-2006 at 07:06 PM.
Rossi4218 is offline   Reply With Quote
Sponsored Links
Old 05-06-2006, 05:23 PM   #2 (permalink)
etono
Moderator
 
Join Date: May 2006
Posts: 86
Default Re: jail gaming code

If you are looking for help, then please give some background on what you are trying to do. Are you trying to ban a member, IP address, etc.? Also you will have much more success getting help from the forum if you don't make people register for something.
etono is offline   Reply With Quote
Old 05-07-2006, 02:38 PM   #3 (permalink)
Rossi4218
Junior Member
 
Join Date: Mar 2006
Posts: 8
Default Re: jail gaming code

well wot i need is a php script containin features of a jail script so if people do a crime they gt banned lets say for 10 mins- 3 hours depending on hw bd the crime is cn u help me
Rossi4218 is offline   Reply With Quote
Old 05-07-2006, 05:06 PM   #4 (permalink)
ablaye
Junior Member
 
Join Date: May 2006
Posts: 36
Default Re: jail gaming code

Well, I can make a custom code for you if you are willing to pay.
ablaye is offline   Reply With Quote
Old 05-08-2006, 12:29 PM   #5 (permalink)
Rossi4218
Junior Member
 
Join Date: Mar 2006
Posts: 8
Default Re: jail gaming code

it dpends on hw mch it will cost
Rossi4218 is offline   Reply With Quote
Old 05-09-2006, 03:52 PM   #6 (permalink)
etono
Moderator
 
Join Date: May 2006
Posts: 86
Default Re: jail gaming code

Rossi are you in college for Computer Science or something? If so, don't pay to have the code done, instead why don't you use the forums to help you learn how to do it yourself?

Ablaye, I'm not trying to take away your business or anything, but I think the PHP section is suppose to be where we can learn from eachother, right? If it is for a gig I think it should be posted in the wanted section.

So, Rossi, I was thinking that one way of going about this is to hold a session variable maybe called penalty that you would hold the time they are out of the penalty. Lets call the page "set-penalty.php"
Code:
<?php session_start(); $minutes = 1; $_SESSION['penalty'] = time() + ( $minutes * 60 ); header( 'location:check-penalty.php' ); exit(); ?>

So now you have a session variable that holds the current time plus the amount of penalty, so then we go to the "check-penalty.php" page
Code:
<?php session_start(); if( isset( $_SESSION['penalty'] ) ) { if( $_SESSION['penalty'] < time() ) { //they served their time remove penalty unset( $_SESSION['penalty'] ); } else { //still in penalty send them to jail header( 'location: jail.php' ); exit(); } } header( 'location: action.php' ); exit(); ?>

First of all we check if a penalty session exists. If it does exist then we compare the time of the penalty variable with the current time. If the penalty time has expired we get rid of the penalty session variable. If they are still in the penalty then we send them to jail or whatever you wish to do. So now at the end of the page it means either they never had a penalty or their penalty is expired so you do your action there.

I am not sure how or if this will fit into your game, but I sure hope you can get some use out of it.

Cheers!
__________________
Jeremy Moseley
My Links: Design Related Blog | Personal Website | Portfolio
etono is offline   Reply With Quote
Old 05-11-2006, 08:59 AM   #7 (permalink)
Rossi4218
Junior Member
 
Join Date: Mar 2006
Posts: 8
Default Re: jail gaming code

u see i also need a jail.php otherwise it wont work cuz i wont b able to link it up cud u find one for me plz or make a custom1(i dont want to pay)
Rossi4218 is offline   Reply With Quote
Old 05-13-2006, 01:31 PM   #8 (permalink)
hi_118
Junior Member
 
Join Date: May 2006
Location: UK
Posts: 5
Send a message via MSN to hi_118 Send a message via Yahoo to hi_118
Default Re: jail gaming code

How Dare You!! Use My Website To Gain Scripts For Your Own! EVERYONE THAT WEBSITE WAS MADE BY ME NOT Rossi4218. Also You Are Not In Collage! Your In HighSchool!
hi_118 is offline   Reply With Quote
Old 06-17-2006, 01:22 PM   #9 (permalink)
hi_118
Junior Member
 
Join Date: May 2006
Location: UK
Posts: 5
Send a message via MSN to hi_118 Send a message via Yahoo to hi_118
Default Hrmm.. Help Needed With Jail Script

Ok im Currently Making a Game. Its a Mafia Game But When People Do crimes They dont get jailed..

Any Ideas?
hi_118 is offline   Reply With Quote
Old 06-17-2006, 01:35 PM   #10 (permalink)
hi_118
Junior Member
 
Join Date: May 2006
Location: UK
Posts: 5
Send a message via MSN to hi_118 Send a message via Yahoo to hi_118
Default Re: Hrmm.. Help Needed With Jail Script

Also i forgot to say.. when the user gets put into jail it doesnt stop the user from going anywere. strange really cause the ban feature i have bans the user from accessing the game.. i think i should you that but i havent got a clue to makeit stop user accessing page for 10 - 90 seconds

Thanks...
hi_118 is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:09 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums