![]() |
credit card script help.
Hello guys, Today I need some help on NPC control.
I have this bank script that I finally got working. It runs in 2 NPC-Controls. 1 is called Bank. The other one is called BankDB. So I got this new credit card script I am making, and basically, it allows you to use the money you have in the bank account, without having to go to the bank and saying /withdraw (amount). Just so I could make sure it works, I put a functionOnPlayerChats thing and made it to where if you say /credit balance, it shows your bank balance basically, since thats what your running off of. For some reason, It isnt showing the bank balance. How Can I make the weapon script called "Credit/Card" know what im talking about when I am talking about the bank balance? Is there a way you can do like findnpc("npcname");? Someone tell me please. Thanks. |
Quote:
PHP Code:
|
Ok,
When you create a new NPC in the NPCs section (has a lizard man picture), it is called a DBNPC: not a Control-NPC. Control-NPC is a specialized default DBNPC. Now, I don't understand why you would need 2 DBNPCs for a bank...surely they could just be joined? From the credit card weapon, you can call BankDB.publicfunction() serverside soo.... PHP Code:
PHP Code:
|
I released a banking system on the code gallery years ago and I believe others have also released versions of their own banking system, you should take a look at those and see if you would want to incorporate any of those features to your system.
Don't take any of the scripts word-for-word copy-and-paste style because most of that stuff was released quite some time ago and could use rescripting. |
| All times are GMT +2. The time now is 03:36 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.