![]() |
Casino Script Help!
Hi, I am making a Slot Machine script and I am trying to make it to where when they grab the slot machine, it takes 6 bucks from the player, and it adds the 6 dollars to the store safe. Here's what I got so far. By the way, the only thing that isn't working is the adding money to the safe part.
function onActionGrab() { if (player.dir != 0) return false; if (this.inuse) { player.addMessage("This machine is currently inuse!"); return false; } if (player.rupees < 6) { player.addMessage("You need $6 to play!"); return false; } this.inuse = true; player.rupees -= 6; this.safe.money += 5; player.rupees-= 6; this.safe.money += 6; scheduleEvent(random(2, 5), "determineoutcome", player); setcharani("slotmachinespin", NULL); } |
Quote:
Try doing this: PHP Code:
|
Quote:
|
Didn't work man.
|
Can someone else help me?
|
is there a reason why you're doing
player.rupees-= 6; this.safe.money += 6; twice? |
Your casino better be realistic and not let anyone leave with winnings.
Please re-post your code, and a detailed explanation of any problems you might have. Is the safe a different NPC altogether? How are you checking to see if the safe? |
The safe money adding ... how are you displaying the balance?
|
Quote:
Was still on my sugar rush, not thinking. Like what Chris said, how are you displaying it? |
All times are GMT +2. The time now is 03:13 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.