Forum

> > CS2D > Scripts > need script...
Forums overviewCS2D overview Scripts overviewLog in to reply

English need script...

3 replies
To the start Previous 1 Next To the start

old need script...

Hidder
BANNED Off Offline

Quote
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
edited 1×, last 04.04.17 12:32:24 pm

old Re: need script...

Cure Pikachu
User Off Offline

Quote
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview