Forum

> > CS2D > Scripts > Equip menu with collect+remove
Forums overviewCS2D overview Scripts overviewLog in to reply

English Equip menu with collect+remove

17 replies
To the start Previous 1 Next To the start

old Equip menu with collect+remove

strelok_953
User Off Offline

Quote
Hello all!
Please sorry for my bad English.
I need help with this code-where i can search this?
√ Collect
√ Remove
i need make for "Flare" multi functions: (it menu for equip)
Spoiler >

and this: (but it 101% not work) i want fix,but i cant,please help me:
Spoiler >

if i take item "flare then this item not pickup(in inventory) and just remove and if i buy +10hp then when i pickup flare i have +10 hp, if i buy +30HP then when i take flare i have +30HP and etc.
Thanks you so much!

old Re: Equip menu with collect+remove

Rainoth
Moderator Off Offline

Quote
So...
You select how much health you get and you get it only when you pick up a flare ?

Why would you do it like that ? Wouldn't it be more simple to get health straight from menu ?

old Re: Equip menu with collect+remove

strelok_953
User Off Offline

Quote
Raining Mammoths has written
Why would you do it like that ? Wouldn't it be more simple to get health straight from menu ?

Yes,it is easier to receive health directly with the menu.

Raining Mammoths has written
You select how much health you get and you get it only when you pick up a flare ?

Yes,I want to. I made a restaurant where the food is served by flare.

old Re: Equip menu with collect+remove

Rainoth
Moderator Off Offline

Quote
The Code >


I could have shortened it a lot but I guess you wanted it presented in a way so you could understand the code yourself. So there it is. I didn't test it but I believe that it should work.

P.S. I still think that it's a dumb idea to do it by picking up flares... I mean, others can pick up the flare you spawn and then you won't have yours. Well.. Suit yourself.

old Re: Equip menu with collect+remove

strelok_953
User Off Offline

Quote
you are right,for you may be stupid,but that is the whole point...
And by the way, if I try to take flare then it just disappears on the floor,but the health i get .
increase in the inventory of the flare is not added.
I hope that this will be so
Thanks you Raining Mammoths! you god!

old Re: Equip menu with collect+remove

Rainoth
Moderator Off Offline

Quote
The Code >


Don't call me stupid. If I give my opinion, it does not make me stupid unless it's ridiculously retarded. The opinion I gave seems to be normal.

old Re: Equip menu with collect+remove

strelok_953
User Off Offline

Quote
no no no ! you what??? I will never say that you are stupid!
I mean it can for you is not so interesting what would you prefer another method is more convenient for you!
I badly know English and use translator and as I understood it too bad.
EDIT:
LUA ERROR: sys/lua/hp.lua:21: attempt to perform arithmetic on field '?' (a nil value)

old Re: Equip menu with collect+remove

strelok_953
User Off Offline

Quote
here (is your code)
Spoiler >

old Re: Equip menu with collect+remove

strelok_953
User Off Offline

Quote
if i user only your script[w/o others]then If i take Flare,i dont have + health and flare added to inventory.
If i use your code + my script,[in my script have many menus] then it error

old Re: Equip menu with collect+remove

Rainoth
Moderator Off Offline

Quote
That's why I'm asking you to post the whole code, in other words, my script + your script, because the error is probably not mine. I'll check my script a bit later by myself.
Just post WHOLE code for now.

old Re: Equip menu with collect+remove

Rainoth
Moderator Off Offline

Quote
The Code >

Tested. Working. If you get an error, it's in your scripts, not mine.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview