• ForceOut?
    4 replies, posted
[code] elseif (arguments[2] == "pickup") then local trace = player:GetEyeTrace(); if player:GetPos():Distance(trace.HitPos) <= 80 and ValidEntity(trace.Entity) then if trace.Entity:IsVehicle() then if (trace.Entity:GetNWEntity("owner") == player) then constraint.RemoveAll( trace.Entity ) trace.Entity:SetNotSolid( true ) trace.Entity:SetMoveType( MOVETYPE_NONE ) trace.Entity:SetNoDraw( true ) timer.Simple( 0, RemoveEntity, trace.Entity ) else cider.player.notify(player, "This car is not yours.",1) end end else if trace.Entity:IsVehicle() then cider.player.notify(player, "You have to be in your car to pick it up.", 1); end end;[/code] Basically this allows you to pick up your car aslong as your inside it, the problem is, If you pick it up, the car goes, But your stuck in mid-air, Unless you press E again. This also doesn't remove the car properly, since after if you try use another car it tells you your other car is still out. Im using cider Help Appreciated!
why are you making it so that you can pick it up while youre inside it... just have the player stand next to it and pick it up.
Im not advanced, I'd need someone to change that for me then? :/
Try this: [code] local trace = player:GetEyeTrace(); if trace.Entity:IsVehicle() then if player:GetPos():Distance(trace.HitPos) <= 80 and ValidEntity(trace.Entity) then if trace.Entity:IsVehicle() then if (trace.Entity:GetNWEntity("owner") == player) then constraint.RemoveAll( trace.Entity ) trace.Entity:SetNotSolid( true ) trace.Entity:SetMoveType( MOVETYPE_NONE ) trace.Entity:SetNoDraw( true ) timer.Simple( 0, RemoveEntity(trace.Entity) ) else cider.player.notify(player, "This car is not yours.",1) end end end end [/code]
Dont work :/ [editline]01:51AM[/editline] FIXED _ NEVERMIND, +100000000000000 to Severedskull who ended up fixing it.
Sorry, you need to Log In to post a reply to this thread.