Results 1 to 10 of 15

Thread: MODDING : How to make virtual money.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by maxdamage99 View Post
    You can try storing money in global variables, I don’t know how good this idea is
    PHP Code:
    getID()
    {
        return 
    self getEntityNumber();
    }

    onPlayerConnect()
    {
        
    id self getID();
        
    level.money[id] = 0;

    Bad idea. The level var is also cleaned (except for level.game array) on round restart. Furthermore, since players go through the "playerconnecting" callback when the round restarts, their money gets reset using this technique.

    Just store in player.pers["money"] or something similar. Look at the stock sd gametype for .pers["kills"] for example.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (18th June 2020)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •