Advertisement
Guest User

Untitled

a guest
Sep 1st, 2014
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.79 KB | None | 0 0
  1. local Clockwork = Clockwork;
  2.  
  3. local COMMAND = Clockwork.command:New("Vort");
  4. COMMAND.tip = "Talk in vortigese.";
  5. COMMAND.text = "<string Text>";
  6. COMMAND.flags = bit.bor(CMD_DEFAULT, CMD_DEATHCODE);
  7. COMMAND.arguments = 1;
  8.  
  9. -- Called when the command has been run.
  10. function COMMAND:OnRun(player, arguments)
  11.     local text = table.concat(arguments, " ");
  12.    
  13.     if (text == "") then
  14.         Clockwork.player:Notify(player, "You did not specify enough text!");
  15.         return;
  16.     end;
  17.    
  18.     if player:GetFaction() != FACTION_VORT and player:GetFaction() != FACTION_CONSCRIPT_BIOTIC then
  19.         Clockwork.player:Notify(player, "You don't know Vortessence!");
  20.         return;
  21.     end
  22.    
  23.     Clockwork.chatBox:AddInRadius(player, "vort", text, player:GetPos(), Clockwork.config:Get("talk_radius"):Get());
  24. end;
  25.  
  26. COMMAND:Register();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement