Jump to content
Stanhope

denied A tiny piece of code

Recommended Posts

inGameUISetEventHandler ["Action", "
    _player = (_this select 1)
    if ( vehicle _player != _player ) then{
        _player vehicleChat format ['%1 used %2', name _player, _this select 4];
    };
    false
"]; 

 

^should make anyone doing any action in a vehicle display an ingame chat message (vehicle channel).  Especially helpful if anyone were to be using the winch again.

(note that it's untested but i'm sure ryko can make it work :))

Share this post


Link to post
Share on other sites

The counter point to this is that it will spam the vehicle channel every time someone uses the action. I appreciate and understand the interest and usefulness of this code, but I'm not sure it's strictly necessary.

Share this post


Link to post
Share on other sites

inGameUISetEventHandler ["Action", "
    _player = (_this select 1)
    if ( vehicle _player != _player && someGlobalBooleanVar) then{

       _message = format ['%1 used %2', name _player, _this select 4];

        [Quartermaster, [adminChannelID, _message]] remoteExecCall ["customChat", 0, false];
    };
    false
"]; 

 

This won't spam, but only put it in admin chat when that global var is set to true.  (Say when someone is messing about with that winch again.)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Forum Statistics

    8,984
    Total Topics
    58,392
    Total Posts
×