Advertisement
Guest User

Untitled

a guest
Apr 27th, 2021
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using GTANetworkAPI;
  5.  
  6. namespace gtavrp.Commands
  7. {
  8. class PlayerCommands : Script
  9. {
  10. //~o~ stands for orange ~w~ stands for white
  11. //Below that is the description
  12. [Command("me", "~o~Usage: ~w~ /me [action]", GreedyArg = true)]
  13. public void CMD_Me(Player player, string action)
  14. {
  15. //This removes the extra spaces inside the chat
  16. action = action.Trim();
  17.  
  18. List<Player> nearbyPlayers = NAPI.Player.GetPlayersInRadiusOfPlayer(20, player);
  19.  
  20.  
  21. foreach (Player item in nearbyPlayers)
  22. {
  23. item.SendChatMessage($"~p~{player.Name} {action}");
  24. }
  25.  
  26. }
  27. }
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement