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

Thread: Paraliser weapon for cider i made.

  1. #10025560
    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

  2. #10025565
    Super Administrator
    Join Date
    Nov 2008
    Posts
    175

    Re: Paraliser weapon for cider i made.

    ehh, stun baton Tongue?

  3. #10025568
    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

  4. #10025570
    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.


  5. #10025572
    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

  6. #10025574
    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: 7 (3 members and 4 guests)

Elkinda, patatkraam, Twerry