GUIAnnouncements

Moved

Total Downloads: 11,755 - First Release: Jul 13, 2015 - Last Update: Oct 20, 2017

5/5, 66 likes
  1. hi,

    plz go update for permision admin
     
  2. JoeSheep updated GUI Announcements with a new update entry:

    1.0.0

     
  3. JoeSheep updated GUI Announcements with a new update entry:

    1.0.1

     
  4. nice, thx for this :)
     
  5. Great plugin :), using it for my own UI atm as I didn't understand the fadeOut feature :D
     
  6. @DylanSMR
    Thanks :) What plugin are you making? Or are you updating one of your current ones?
     
  7. QuarryLocks, re-writing it as it was pretty messy. Writing another plugin as well though.
     
  8. Hi Joe,

    I'm trying to use GUIAnnouncements to automatically show an announcement whenever the helicopter spawns.
    However I can't get it to work. Could you help me with this one?

    I tried pasting in the code below, but I don't know how to make it use the console command:

    Code:
    #region Entity Hooksvoid OnEntitySpawned(BaseNetworkable entity)
    {
           if (entity.ToString().Contains("/patrolhelicopter.prefab"))
           announce.announce("message goes here");
    }#endregion
    What am I doing wrong?

    Thank you,
    Michael
     
  9. If your calling it inside of the plugin itself(the gui plugin) then you call the create GUI plugin. From a different plugin you would have to reference it and call it like PluginName?.Call(hook name, Parameters)
     
  10. The issue is that where you have put my command that is literally not telling it to do anything because it hasn't a clue what to do with it.
    If you are trying to have another plugin do that, then as DylanSMR said you will need to call the LoadMsgGui method in my plugin with a string called Msg which contains what you want it to say. I will probably add an option for helicopter announcements and airdrop announcements in the future.
     
  11. I could help you with that if you want.
    Also try doing LoadMsgGui("Insert Message Here") if your going to try and call it via the plugin.
     
  12. Thanks for the quick replies guys.
    I'm going to try if I can get it to work with the extra info you posted. :)
     
  13. I think my anti chat flood has a example of plugin references by the way.
     
  14. This actually worked. I think I've written "LoadMsg" instead of "LoadMsgGui".
    Thank you guys!

    Code:
    #region Entity Hooks// Helicopter spawn notification
    void OnEntitySpawned(BaseNetworkable entity)
    {
                if (entity.ToString().Contains("/patrolhelicopter.prefab"))
                    LoadMsgGui("The patrol helicopter is spawning.");
    }#endregion
     
  15. Sure if I get stuck anywhere I will shoot you a message.
     
  16. Glad it worked :)
    [DOUBLEPOST=1462314010,1462305493][/DOUBLEPOST]
    You should add a config option for color btw. So like:
    Code:
    GetConfig("AnnouncementTextColor", "")
    Code:
    Config["AnnouncementTextColor"] = "255 0 0 1";
     
  17. @DylanSMR
    I might do that as an option, but at the same time you can change colors through the console command using generic color names or hex codes like this:
    Code:
    <color=#66FFFF>this text will be a shade of blue</color> <color=red>this text will be red</color>
    Everything outside those color tags will be what ever color you set in the config or default white. If it isn't white it would mean more color tags, so I have yet to contemplate it all as a whole.
     
  18. Well yeah but the GUI doesn't use Hex codes I don't believe. I am fairly sure it uses RGB based codes.
     
  19. I think it is more to do with how the console interprets the tags rather than the plugin and CUI API itself, when you type it in the F1 console and it shows the command you just typed, it will change the text to the color stated in the tags.