Forum

> > CS2D > Scripts > Spawn random items and limited
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Spawn random items and limited

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Spawn random items and limited

Carcass
User Off Offline

Zitieren
Hello all,
just if it's not hard and possible to do:
how to random spawn 3 items:
[coins,money,gold] in map,
this items spawned maximum 10.
Script check map-if item with id 66(coins) or 67 ot 68 in map is 10 - script will not spawn it anymore. if it 9 or small it will again spawn for being 10, spawntimer 60 sec.
Sorry me bad english i from russian
/i writte it too fast, sorry, if i will onger it will be better.. if it is not understandable i can re-writte it.

alt Re: Spawn random items and limited

Rainoth
Moderator Off Offline

Zitieren
Loop the whole map, in accessible places spawn your items and record their coordinates. All of the coordinates are stored in a table. When a person collects an item, it checks if it's one of the locations (you do that by looping the table with locations). When it's time to spawn again, you loop 10 - (length of your table). That's one way to do it.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht