Forum

> > CS2D > Scripts > need script...
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch need script...

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt need script...

Hidder
BANNED Off Offline

Zitieren
hi every one, i just need script, kill npc then i got +1000 money
how to do that ???

and another thing, how to make if player pressed f button he will get +1000 money ? pls i need those scripts to make fun thing in my script
1× editiert, zuletzt 04.04.17 12:32:24

alt Re: need script...

Cure Pikachu
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
addhook("objectkill","npckill")
function npckill(oid,pid)
	if pid > 0 then -- If object is killed by a player
		if object(oid,"type") == 30 then -- If object is NPC
			parse("setmoney "..pid.." "..player(pid,"money")+1000)) -- Adds $1000 to the player's money, game automatically caps to $16k
		end
	end
end
Also avoid "press F button to do this" because not everyone shares the same control scheme as you. Assuming it uses the flashlight then:
1
2
3
4
addhook("flashlight","flcash")
function flcash(pid)
	parse("setmoney "..pid.." "..player(pid,"money")+1000))
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht