ka0s

[GUIDE] Exile Notifications?

12 posts in this topic

Aye!

Ok, so I've seen several attempts on how to show a message in the most efficient way in Exile, of course if it's huge information you'd probably go with Typetext, Typetext2TitletextinfoText or even go with a dialog. 

In this short [HOWTO] I'll explain how to use the Exile notification system, can be useful for many things, I for one utilize it for custom restart scripts, together with other systems like DMS notifications for example, get that screen lid up real good with info. 

screenshot.138.jpg.b062685de552393350787

First you'll need to know if it's a message you want to broadcast to ALL players, or just locally for 1 player, so we need to decide whether we want to go with server message or client gui message. Above message is sent with client gui. 

There are several classes for CfgNotifications, which you can use, but most of them use the same icon, list in below spoiler: 

Spoiler

SafeIsLockedWarning
MaximumNumberOfTerritoriesReached
RepairFailedWarning
VehicleCustomsWarningNothingToCustomize
VehicleCustomsWarningNoVehiclesNearby
ProtectionMoneyPaidInformation
AddedToTerritoryMessage
PartyInviteMessage
PartyCreatedMessage
ClanRegisteredMessage
MoneySent
MoneyReceived
Whoops
RestartWarning
LockKickWarning
Success
ItemConsumedInformation
ItemCraftedInformation
InventoryFullWarning
InspectingFailedInformation
TurnedIntoABushNotification
TreasureMarkerInformation
ItemPurchasedInformation
ItemSoldInformation
ItemSoldInformationWithRespect
VehiclePurchasedInformation
VehicleSkinPurchasedInformation
ConstructionPlacedInformation
SafePlacedInformation
ConstructionAbortedInformation
ConstructionAbortedCombat
ConstructionVehicleWarning
ConstructionSpawnZoneWarning
ConstructionTraderZoneWarning
ConstructionMovedTooFarWarning
NoMatchesWarning
SafezoneEnter
SafezoneLeave
EarplugsOn
EarplugsOff
VehicleRefuled
VehicleRefulingFailed
VehicleRefulingFailedFull
VehicleDrained
VehicleDrainingFailed
VehicleDrainingFailedFuel
TerritoryPurchased

You can call these categories or whatever, but these are the ones we can work with, and it's more than enough I'd say. 

So how did I make that notification? 

Spoiler

["Success",[format["My message to broadcast to player here."]]] call ExileClient_gui_notification_event_addNotification;

This would look like this; screenshot.139.jpg.59bd517d655572440fca9

As you can see in the spoiler I've used "ExileClient_gui_notification_event_addNotification; which ONLY executes on local player, and is not publicly broadcasted on Exile network.

Now we want to make for example a restart warning, and broadcast it to the entire server, so we'll walk away from "ExileClient" and use "ExileServer" instead. 

Spoiler

["RestartWarning",[format["A customized restart message"]]] call ExileServer_system_network_send_broadcast;

This would look like this; screenshot.140.jpg.a21351dad73750679ccc3

You can see I've utilized "ExileServer_system_network_send_broadcast;" here, which means this will be broadcasted serverwide to all players, and not locally as we did with "ExileClient_gui_notification_event_addNotification;"

 

This hopefully clarifies the usage of Exile Notifications, and I hope somebody finds it useful ^_^

ONE LAST THING! If you're using mARMAcp for monitoring these commands can also be executed from their editor (Kinda how I made my 10 minute quick restart script).

Additions to this HOWTO are welcomed. B|

Enjoy!

3 people like this

Share this post


Link to post
Share on other sites
_namePlayer = name player;
["systemChatRequest", [format ["%1 JUST CALLED IN AN AIRDROP - CHECK YOUR MAP FOR LOCATION", _namePlayer]]] call ExileServer_system_network_send_broadcast;

Wrote this, but never works, whats wrong with it ?

Edited by GR8

Share this post


Link to post
Share on other sites
Advertisement
1 hour ago, GR8 said:

_namePlayer = name player;
["systemChatRequest", [format ["%1 JUST CALLED IN AN AIRDROP - CHECK YOUR MAP FOR LOCATION", _namePlayer]]] call ExileServer_system_network_send_broadcast;

Wrote this, but never works, whats wrong with it ?

You're trying to use a class that doesn't exist in CfgNotifications, therefore it won't work. Maybe we can convince the devs to make some more classes with some more different icons, as it seems at the moment you can only use success and fail icons. Will check if there is a smart way to use the notifications but with custom icon within the mission file. :)

For now try and change SystemChatRequest to Success, then it should work, remember when using 

ExileServer_system_network_send_broadcast;

It has to be serverside tested as the function doesn't exist in ExileClient :)

Hope it helps. 

Share this post


Link to post
Share on other sites

Oh Weird, I thought there was a SystemChatRequest. Maybe its from DMS.

If it doesnt exist, then thats probably why its not working. 

Edited by GR8

Share this post


Link to post
Share on other sites

I recall that DMS use something like that, check the OP for available classes from ExileClient config.cpp :)  

Let me know how it works for you. 

Share this post


Link to post
Share on other sites

Is there anything we can use for an announcement message like the one i want to do ? All of these messages are the windows 10 style notifications, and can't fit alot of characters.

Edited by GR8

Share this post


Link to post
Share on other sites

I'll check for some options later, if I look at another status quo function the next few hours I'll probably shoot someone :D

1 person likes this

Share this post


Link to post
Share on other sites

just an addition :)

1 person likes this

Share this post


Link to post
Share on other sites
7 minutes ago, Taylor Swift said:

just an addition :)

Merci ^_^

1 person likes this

Share this post


Link to post
Share on other sites
On 2/27/2016 at 9:45 PM, ka0s said:

I'll check for some options later, if I look at another status quo function the next few hours I'll probably shoot someone :D

Is this wrong Kaos?

I have been rewriting older code, and used an older restart script.

        case ((_timeUntilRestart < (2 * 60)) && !_120secondspassed) :
        {
            ["RestartWarning",[format["2 minutes until server restart."]]] call ExileServer_system_network_send_broadcast;

Basically does until true, then i want it to spit out a nice little msg to users all, get the fook out!!!

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.