1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Motorbikes

Discussion in 'Discussion' started by Bescharlie, Sep 7, 2013.

  1. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    Hey guys, i have just tried adding a motorbike to my server, its scars based.

    I have made the motorbike so it has a button in the spawn tab, which looks great, and it spawns just fine! :D

    I can then press E on teh bike and get on it and ride it around.

    Howver i have two problems, When i was looking at it through a camera, i couldn't see my player model?

    When the bike goes on a angle, or trys to turn to fast, i hear a punching noise, and the bike jerks and spins asif hit by a vector force, they are precise movements.

    Anybody know why?

    The item code for my bike is:
    Code:
    --[[
    	? 2013 CloudSixteen.com do not share, re-distribute or modify
    	without permission of its author ([email protected]).
    --]]
    
    local ITEM = Clockwork.item:New();
    ITEM.name = "Chopper";
    ITEM.cost = 250;
    ITEM.model = "models/hellfury/hellfury.mdl";
    ITEM.batch = 1;
    ITEM.weight = 2;
    ITEM.business = true;
    ITEM.category = "Bikers";
    ITEM.description = "A badass Chopper";
    
    -- Called when the item's shipment entity should be created.
    function ITEM:OnCreateShipmentEntity(player, batch, position)
    	local entity = ents.Create("cw_motorbike");
    	
    	Clockwork.player:GiveProperty(player, entity, true);
    	
    	entity:SetAngles(Angle(0, 0, 0));
    	entity:SetPos(position);
    	entity:Spawn();
    	
    	return entity;
    end;
    
    -- Called when the item's drop entity should be created.
    function ITEM:OnCreateDropEntity(player, position)
    	return self:OnCreateShipmentEntity(player, 1, position);
    end;
    
    -- Called when a player attempts to order the item.
    function ITEM:CanOrder(player)
    	if (Clockwork.player:GetPropertyCount(player, "cw_motorbike") >= 1) then
    		Clockwork.player:Notify(player, "You have reached the maximum amount of this item!");
    		
    		return false;
    	end;
    end;
    
    -- Called when a player drops the item.
    function ITEM:OnDrop(player, position)
    	if (Clockwork.player:GetPropertyCount(player, "cw_motorbike") >= 1) then
    		Clockwork.player:Notify(player, "You have reached the maximum amount of this item!");
    		
    		return false;
    	end;
    end;
    
    ITEM:Register();
    And when i was making it a gmod entity, i just put the three files from teh lua/entites/bike folder in to a folder called cw_motorbike in my clockwork entites tab

    Any help i can get on this would be great :)
     
  2. Bescharlie

    Bescharlie Im on the right, sucha pretty little boy ;')

    Okay the invisible rider problem just sorted itself out! Congrats error on solving yourself! ;) ermm but teh other one is still there and is bad enough to flip the bike upside down every 10 meter
     
  3. Kezter

    Kezter Certified Old Fag

    The punching noise I believe is SCars side as on our Halo RP the mongoose quad gets that and you just fly all over the place.
     

Previous Readers (Total: 0)