Promocodes

Moved

Total Downloads: 1,347 - First Release: Nov 19, 2015 - Last Update: Jan 25, 2018

5/5, 10 likes
  1. LaserHydra submitted a new resource:

    Promocodes - gives you the possibillity to set up promocodes

    Read more about this resource...
     
  2. Make a hook OnCodeRedeemed(player, code)?

    Then we could detect what, give them kits etc.
     
  3. I am not sure if the code would do anything. I'd pass the name of the code.
     
  4. If you make it like an API then plugin devs will know what the name is for :p
     
  5. I don't see a reason in having this as API. What I am planning to do is adding a Hook so also other plugins can add support for Promocodes and do something when redeemed - example for Kits, giving a kit :)
     
  6. Would be good to be able to set-up auto donators based on a unique code sent to them after payment.
    That would be a bit harder as you need to take into account for a donation from an external source.
     
  7. could you explain it a bit more?
     
  8. I am not sure it can be achieved as there are external sources involved for payment systems.
    1 of the annoying things for a player is they donate and have to wait for us Admins to set up there Donator status.
    If we just logged off for the night they may have to wait untilt he next day.

    If there was a way we could utilise the unique code system to add a donator permission or vip status after a donation was made that would make it automatic.

    As a manual system, I could just give the codes to existing donators who play later and they could PM the code to a person who said they donated and I check it in the morning.
     
  9. well this plugin is already working for that. Just needing to work together with other stuff. For example you can make an own random key picker for your website which will give them a random key from a list or you use something like enjin.com which has that feature already and just add your codes to that list.
     
  10. Hi
    LaserHydra,

    is possible
    +Vip?
    Vip1
    vip2
    vip3
    ...
    Thanks

    Code:
    {
      "VIP": {
        "Codes": [
            // 10 random codes here
        ],
        "Permission": "vip"
      }
    }
     
  11. Sure, just copy pasre and edit it. The plugin allows you to make your own.
     
  12. this way?
     

    Attached Files:

  13. Don't edit the plugin file. Use the config file...
     
  14. is it possible to add console commands not permission.

    like when someone uses promo code they will use a command.
    /promo <code> wil run inv.giveplayer "playerid" "hatchet bp"
    [DOUBLEPOST=1449265597][/DOUBLEPOST]
    does it work if add other than perms ?
     
  15. I'll be working more on this soon.
     
  16. oww man really thanks for your hard working ! :) look forward to use it :)
     
  17. And if possible u should add once time usable (or more) but not infinite promo codes.
     
  18. promocodes are single-use currently...
     
  19. Plugin broken?
    Code:
    [Oxide] 11:33 AM [Error] Failed to call hook 'cmdPromocode' on plugin 'Promocode
    s v1.0.0' (NullReferenceException: Object reference not set to an instance of an
    object)
    [Oxide] 11:33 AM [Debug]   at Oxide.Plugins.Promocodes.RedeemCode (.BasePlayer p
    layer, System.String code) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Promocodes.cmdPromocode (.BasePlayer player, System.String cm
    d, System.String[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Promocodes.DirectCallHook (System.String name, System.Object&
    ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo metho
    d, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[]
    args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[]
     
    Last edited by a moderator: Jan 1, 2016
  20. Plugin currently broken.

    [Oxide] 11:42 PM [Warning] [Promocodes] 1 Promocode/s saved to oxide/logs/Promocodes.txt
    Saved 6,290 ents, serialization(0.00), write(0.00), disk(0.00) totalstall(0.01).
    Saving complete
    [Oxide] 11:43 PM [Error] Failed to call hook 'cmdPromocode' on plugin 'Promocodes v1.0.0' (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 11:43 PM [Debug] at Oxide.Plugins.Promocodes.RedeemCode (.BasePlayer player, System.String code) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Promocodes.cmdPromocode (.BasePlayer player, System.String cmd, System.String[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.Promocodes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Core.Plugins.Plugin.CallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0