Forum archive — a preserved copy of the VentMob forums (2008–2011), rebuilt from Wayback Machine captures. Skin: 2009 | 2011 · Back to the memorial

Paraliser weapon for cider i made.

#10025560
11-07-2009, 03:47 PM
shaneman
Newcomer
 
Join Date: June 19, 2009
Posts: 6
Paraliser weapon for cider i made.

hey guys i made a weapon for my cider server and i would like to share it with you Smiley



--[[
Name: "sh_cider_pariliser.lua".
Product: "Cider (Roleplay)".
--]]

if ( !cider.plugin.get("Generic") ) then return; end;

-- Define the item table.
local ITEM = {};

ITEM.name = "Paraliseing stick";
ITEM.size = 1;
ITEM.cost = 10000;
ITEM.team = TEAM_ARMSDEALER;
ITEM.model = "models/weapons/v_stunstick.mdl";
ITEM.batch = 10;
ITEM.store = true;
ITEM.plural = "paraliser";
ITEM.uniqueID = "cider_knockout";
ITEM.description = "A stick that paralises people for some time.";

function ITEM:onUse(player)
   if ( !player:Hasweapon(self.uniqueID) ) then
      player:Give(self.uniqueID);
      player:SelectWeapon(self.uniqueID);
      
      -- Return here because we're going to use the item.
      return;
   end;
   
   -- Select the weapon.
   player:SelectWeapon(self.uniqueID);
   
   -- Return false because we already have this item out.
   return false;
end;

-- Called when a player drops the item.
function ITEM:onDrop(player, position) end;

-- Called when a player destroys the item.
function ITEM:onDestroy(player) end;

-- Register the item.
cider.item.register(ITEM);





it is a weapon that you can use to knock people out with.  Grin

- shaneman
Last Edit: July 11, 2009, 03:53:44 PM by shaneman
#10025565
11-07-2009, 03:59 PM
Chaz
Super Administrator
 
Join Date: Nov 2008
Posts: 175
Re: Paraliser weapon for cider i made.

ehh, stun baton Tongue?
#10025568
11-07-2009, 04:07 PM
shaneman
Newcomer
 
Join Date: June 19, 2009
Posts: 6
Re: Paraliser weapon for cider i made.

Its like a stun batton but its like a batton that normal people have for self defence but it costs 10k for one
its really cool i would say try it out and tell me what you think  Tongue
#10025570
11-07-2009, 04:09 PM
Lexi
Applejack Lead Developer
 
Join Date: Dec 2008
Posts: 1,491
Re: Paraliser weapon for cider i made.

You are aware that you need to also make a SWEP for that to work, right?
__________________
I code your babies.

#10025572
11-07-2009, 04:13 PM
shaneman
Newcomer
 
Join Date: June 19, 2009
Posts: 6
Re: Paraliser weapon for cider i made.

nope because cider_knockout is allready in cider/entities/weapons/

Im 100% sure it should work.   
 
and lexi why did u kick me from the game earlyer LOL
#10025574
11-07-2009, 04:16 PM
Lexi
Applejack Lead Developer
 
Join Date: Dec 2008
Posts: 1,491
Re: Paraliser weapon for cider i made.

So you make an item that gives players the police KO baton?
Thanks, but we'll pass on that.
__________________
I code your babies.

Users Browsing this Thread: 8 (3 members and 5 guests)
Airis, Lexi, Newlife-