![]() |
Simple level restriction
Heya, i was wondering if you guys could help me with this. Im making a simple lvl restriction system, but i want it to be easily editable with account names that can access it. First i thought if i use a weapon as a keycard and if the player doesn't have the weapon, he/she will be warped elsewhere but its not efficient enough. Any ideas?:noob:
|
Use a database NPC to store flags of rights within the level, including who can access it.
|
You could simply make a class holding the restriction and a list of accounts, and join it to the level.
EDIT: Or what TSA said |
I am new to scripting and, i know what your saying, but i don;t know where to start doing that. I like the use of a database NPC to keep it simple but any advance on that?
Most appreciated. |
I'm not positive this is what you're looking for but there is a tutorial in the wiki explaining how to make database NPC's.
http://wiki.graal.net/index.php/Crea..._Communication |
Ignore Bell's post (sorry Bell), that's not relevant to what you want to do.
If you create a database NPC named, say, AccessControl, you can access public functions in the script simply by calling them from any serverside script: PHP Code:
PHP Code:
An example of the level script: PHP Code:
|
Quite alright Chris, I was attempting to guess what he was hunting for. I knew someone would correct me if I was wrong :D.
|
Thanks CBK. I know know that DPNCS can be used for much more than storing data. Thanks. Im not gonna copy and past the script but use it as a template for my own. That way i will learn more and be happier with the outcome, if any. Thanks guys.
|
| All times are GMT +2. The time now is 06:58 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.