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
--[[
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.
- shaneman
Last Edit: July 11, 2009, 03:53:44 PM by shaneman




?
