Bacon_Space

Basic Reeesource

Sep 26th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. using CitizenFX.Core;
  2. using System.Threading.Tasks;
  3.  
  4. namespace BasicResourceClient
  5.     public class BasicResourceClient : BaseScript
  6. {
  7.     public bool hasReceivedMotd = false;
  8.  
  9.     public BasicResourceClient()
  10.     {
  11.         EventHandlers.Add("sendMotd", new Action<string>(ReceivedMotd));
  12.     }
  13.  
  14.     private void ReceivedMotd(string motd)
  15.     {
  16.         if (!hasReceivedMotd)
  17.         {
  18.             TriggerEvent("chatMessage", "SYSTEM", new[] { 255, 0, 0 }, motd);
  19.             hasReceivedMotd = true;
  20.         }
  21.     }
  22. }
  23. )
Advertisement
Add Comment
Please, Sign In to add comment