Forum

> > CS2D > Scripts > npc drop money
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch npc drop money

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt npc drop money

pbeloto
User Off Offline

Zitieren
someone could create a npc drop money ? equal to c - 4 server

example :

when you kill an npc drop money he spread the floor

and also be able to make the npcs nation every 2 minutes in the form of random .

example :

random position of the map .

really appreciate if someone could do that to min : D

sorry my english bad

alt Re: npc drop money

Dynamite07
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
CoinsDrop={-2,3}

addhook("objectkill","objectkillHook")
function objectkillHook(id)
     if object(id,"type") == 30 then
         local z = math.random(CoinsDrop[1],CoinsDrop[2])
         for i = 1, z do
               parse("spawnitem 66 "..object(id,"tilex")+(math.random(-1,1)).." "..object(id,"tiley")+(math.random(-1,1)))			   			   
         end
     end
end
end

Should work. I dont me remember.

"and also be able to make the npcs nation every 2 minutes in the form of random ." what? spawn a random npc each 2 minutes?

alt Re: npc drop money

pbeloto
User Off Offline

Zitieren
user Dynamite07 hat geschrieben
1
2
3
4
5
6
7
8
9
10
11
12
CoinsDrop={-2,3}

addhook("objectkill","objectkillHook")
function objectkillHook(id)
     if object(id,"type") == 30 then
         local z = math.random(CoinsDrop[1],CoinsDrop[2])
         for i = 1, z do
               parse("spawnitem 66 "..object(id,"tilex")+(math.random(-1,1)).." "..object(id,"tiley")+(math.random(-1,1)))			   			   
         end
     end
end
end

Should work. I dont me remember.

"and also be able to make the npcs nation every 2 minutes in the form of random ." what? spawn a random npc each 2 minutes?



yes it works


yes it works , you know create npc spawn with random position ?

#Edit

you know put hp in the npc script ?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht