[Request] Chat bank

Topic created · 8 Posts · 175 Views
  • I've seen a server before where u can do .deposit and .withdraw and save your money in a 'chat bank'. Does anyone know where I can find this?

  • stupid and lame to do. but if you really cared, you could see if a dev would do it for you. even then, chances are likely non as this is stupid

  • @jjk is not stupid question. Only in server with this command you can, you should make a full iw4m plugin to make it. I don't like the idea of commands because is unfair. Will make the game so easy and boring.

  • @Sorex yeah true it makes the game more boring, I just want to implement it so I can hand out some money if people really need it.
    I already have a server but I don't know how to write a plugin, is there an API for commands somewhere? what coding language is it?

  • @jjk You can make it in c and c sharp, is easy if you know some basics

  • @Sorex said in [Request] Chat bank:

    @jjk You can make it in c and c sharp, is easy if you know some basics

    okay thanks for that, c# is not too bad so I think I'll be able to do it.
    do you maybe know where I can find an API or something similar so I know game variables

  • @jjk
    The only way to learn is by looking iw4m plugins and project https://github.com/RaidMax/IW4M-Admin/tree/master/Plugins

  • Basically, you could do this really simply now that I think about it.

    In GSC, you can actually listen for chat messages if you use this server plugin: https://github.com/fedddddd/t6-gsc-utils
    (Go to Releases, click "gsc-utils.dll" to download, drag into your server's t6r/data/plugins folder)

    In this GSC example you are about to see, I show you how to get 100 free points when you type ".givemoney" into the chat. How you would go about storing a user's amount of money to withdraw and deposit is on you to figure out.

    GSC Example:

    Put this in init()

    level thread watchChatMessages();
    

    And put this something in your code:

    watchChatMessages()
    {
       level endon("end_game");
       for(;;) {
          level waittill("say", player, message);
          if (toLowerCase(message) == ".givemoney") {
             player.score += 100;
             player tell("You have been given ^2100 ^7points!");
          }
          wait 0.01;
       }
    }
    
Log in to reply