View Single Post
  #3  
Old 11-16-2018, 01:09 PM
irongut_av's Avatar
irongut_av
Fire Beetle
 
Join Date: Sep 2018
Posts: 20
Default

Thanks for the reply... I understand about the value being copper.

The problem is that no money is being taken at all. The method is not returning a Boolean, and no message is shown to the entering client that has the proper name. I wanted to know if this script will fire on someone else's server, of course checking for a different client name, etc.


Edit: I've updated the script, to verify the event is firing correctly... and it does:
Code:
function event_enter_zone(e)
  if(e.self:GetName() == "Raccoon") then
    e.self:Message(14, "Hi Raccoon")
    if(e.self:TakeMoneyFromPP(1000, true)) then
      e.self:Message(14,"Thanks for the cash!")
    else
      e.self:Message(14,"You're broke, sucker!")
    end
  end 
end

The only message I see with my test client is "Hi Raccoon". I don't see either of the 'if' statement branch messages, with no money taken.
Reply With Quote