Forum

> > CS2D > Scripts > Inventory Pickup Fix
Forums overviewCS2D overview Scripts overviewLog in to reply

English Inventory Pickup Fix

7 replies
To the start Previous 1 Next To the start

old Inventory Pickup Fix

SeanHoca
User Off Offline

Quote
Hey US.de us !

Can someone edit this lua?
What I need is;

• No Pickup for Items ( inv_np= {xx,xx,xx,xx} ??? )
• Save System --OPTIONAL--

CODE:
Spoiler >

THANKS!

old Re: Inventory Pickup Fix

Nekomata
User Off Offline

Quote
Here's your no-pickup script (not tested);
Replace it with the _walkover(id, od, a) function
1
2
3
4
5
6
7
8
9
10
11
12
13
14
inv_np = {45,82} --added laser & super armor

function _walkover(id, iid, type, ain, a, mode)
	-- what you orginally had
	if iid>0 then
		parse("removeitem "..type)
		set_wpn_inv(id,iid,1)
		return 1
	end
	-- where the no inv item pickup array kicks in
	for i,v in pairs(inv_np) do
		if iid == v then return 1 end
	end
end

You asked for a save system, but you also need to elaborate on what you need to save. o.O

old Re: Inventory Pickup Fix

SeanHoca
User Off Offline

Quote
@user Nekomata:
Thanks for the no-pickup script!
I actually don't really need save system.
But if you can do it, i might use it in the future.

• Save System (saving items in inv)

EDIT: Now it doesn't even taking items into inventory.

old Re: Inventory Pickup Fix

Nekomata
User Off Offline

Quote
Fixed & added the save script. Haven't tested the save script altho.
Remember to create a folder called "data" in sys/lua

The script - User save + fix >

old Re: Inventory Pickup Fix

Joni And Friends
User Off Offline

Quote
This is the save system for your Inventory Script
Look at this! >


For make it work you must change the _join hook on your Inventory Script with this one
Click on this! >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview