SHARE
TWEET

Untitled

a guest Mar 20th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ITEM:OnDrop(player, itemTable, position, bNoSound, bNoTake)
  2.     return self:CreateEnt();
  3. end;
  4.  
  5. function ITEM:CreateEnt(player, position)
  6.     local trace = player:GetEyeTraceNoCursor();
  7.    
  8.     if (trace.HitPos:Distance( player:GetShootPos() ) <= 192) then
  9.         local entity = ents.Create("electra_moonlight");
  10.  
  11.         Clockwork.player:GiveProperty(player, entity);
  12.  
  13.         entity:SetModel(self.model);
  14.         entity:SetPos(trace.HitPos);
  15.         entity:Spawn();
  16.     else
  17.         Clockwork.player:Notify(player, "You cannot drop this item that far away!");
  18.         return false;
  19.     end;
  20.  
  21. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top