Hello, i think the titel says it all, my problem is that the car wont pickup when the button is pressed
And the lua file is like this
[lua]
-- Pick up a players CAR.
function cider.item.pu(player, item, position)
if (player.cider._Inventory[item] and player.cider._Inventory[item] > 0) then
if (cider.item.stored[item]) then
if (!position) then
position = player:GetEyeTrace().HitPos
-- Set the z position of the vector to be 32 units higher.
position.z = position.z + 16;
end;
-- Check to see if we have an Pick up function.
if (cider.item.stored[item].onPU) then
if ( cider.item.stored[item]:onPU(player, position) == false ) then return false; end;
-- Update the player's inventory.
cider.inventory.update(player, item, 1);
-- Make the item at that position.
cider.item.make(item, position)
-- Return true because we did it successfully.
return true;
end;
end;
end;
-- Return false because we failed somewhere.
return false;
end;
[/lua]
Its made out of the "Drop" function, because prick up is the oppiset of drop so i thought that would be an good diea s:
Sorry, you need to Log In to post a reply to this thread.