Forum

> > CS2D > Scripts > Dead drop random Grenade, Bandage & etc...
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

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

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

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

phihung940
User Off Offline

Zitieren
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 ?

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

sheeL
User Off Offline

Zitieren
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

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

omg
User Off Offline

Zitieren
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

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

phihung940
User Off Offline

Zitieren
@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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht