Forum

> > CS2D > Scripts > Dead drop random Grenade, Bandage & etc...
Forums overviewCS2D overview Scripts overviewLog in to reply

English Dead drop random Grenade, Bandage & etc...

3 replies
To the start Previous 1 Next To the start

old Dead drop random Grenade, Bandage & etc...

phihung940
User Off Offline

Quote
I need a LUA that when player dead will random drop these items:

- Grenade (HE)
- Bandage
- Primary ammo
- Secondary ammo
- Coins

and of course... my server using basic class script of Unreal Software. So the class script is not allow you to drop or pick anything, is there anyway player can pick up these item but not interrup the class-system ?

old Re: Dead drop random Grenade, Bandage & etc...

sheeL
User Off Offline

Quote
Try this
see the example

1
2
3
4
5
6
7
8
IList = {51,65,61,62,66};

addhook("die","_die")
function _die(id)
     for i in pairs(IList) do
          parse("spawnitem ".. IList[i] .." ".. player(id,"tilex") .." ".. player(id,"tiley"));
     end
end

I'm using spawnitem, I believe it will work

old Re: Dead drop random Grenade, Bandage & etc...

omg
User Off Offline

Quote
notice he said random and u cant loot anything because hes using the sample lua

the best solution would be to label weapons available to each class (and those available to any class, aka those listed here) so u wouldnt have to have no looting

the only other solution i can see is equipping 1 of these onto the player randomly

old Re: Dead drop random Grenade, Bandage & etc...

phihung940
User Off Offline

Quote
@user omg: Can this more easier ?

- Class A dead drop Ammo
- Class B dead drop secondary ammo
- Class C dead drop Medikit ?

How about that ? No need to random or else... just simple like that. and about the picking problem, I'm already fix it, all done.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview