Time limit on script
Hello all,
I have this code which is supposed to modify the bcm plugin so its xpblock gives xp every 6 mins, but the problem is the script I have now gives xp multiple times per second, which is a problem! This is the script: PHP Code:
Keep up the good work, CarbonDioxide |
Re: Time limit on script
i can't see any problem, maybe g_xpblock_used is being reseted somewhere , post all the code.
|
Re: Time limit on script
Add a global variable and set it's value with get_gametime() on successful touch and check the difference between the current time and that's from the variable.
It should be something like this: PHP Code:
|
Re: Time limit on script
try this,
PHP Code:
|
Re: Time limit on script
Quote:
The error: PHP Code:
|
Re: Time limit on script
Actually, a variable won't be useful here, so it's better to use one of the fuser private entity data.
Go to CreateBlock function: Find this: PHP Code:
PHP Code:
Make it like this: PHP Code:
|
Re: Time limit on script
oops sorry forgot the index... was sleepy :D
PHP Code:
|
Re: Time limit on script
Ok guys, I made it, thank you all a lot !!
|
| All times are GMT -4. The time now is 07:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.