Little help with TakeMoneyFromPP
I am writing a little script for npc who sells items and services, but is not an actual merchant (so people can't sell to him)
However instead of giving money to npc I want script to just take money from the player. So I need: 1. check if player has enough money 2. take the money Now: Code:
a=$client->GetCarriedMoney(); Also - updateclient=false ? is that right? or should it be true? |
I didn't fully check this out, but I believe 'updateclient' is a client-specific requirement. (If someone can validate this... Ti = true, SoF+ = false)
If you're catering to a specfic client(ele), you might be able to avoid any checks and keep it hard-coded. |
ok if I want this to work for all clients, can just omit that part?
|
Disregard..as long as you're not using the merchant interface, I think it will just be updateclient = true.
Client updates are only sent to clients that don't subtract merchant purchases automatically. If you ARE using a merchant interface, then you will have to determine the client type. |
oh no, this is just for a regular npc which I specifically want to be a non merchant - as I said in the 1st post - i want player be able to buy, but not sell - so player just tell npc what they want to get and npc takes cash from them.
I am just trying to avoid the hassle of having players giving npc the cash directly which is always cumbersome. |
Then, yes, it needs to be true. Otherwise it would only deduct the server money and the client would still show the pre-purchase amount. (Sorry for confusion.)
|
no problem, thank you for looking it over ;)
|
All times are GMT -4. The time now is 08:54 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.