Forum

> > CS2D > Scripts > Little script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Little script

5 replies
To the start Previous 1 Next To the start

old Little script

xNir
User Off Offline

Quote
Hi everyone,

Can someone help me to make a simple script which does this:

If a player died, then he'll respawn at the same place where he died

Thanks.

old Re: Little script

Devil-Thanh
GAME BANNED Off Offline

Quote
1
2
3
4
addhook("die","p_die")
function p_die(id)
parse("spawnplayer "..id.." "..player(id,"x").." "..player(id,"y"))
end
havent tested. tell me if it doesn't work.

old Re: Little script

ReVoltage
User Off Offline

Quote
So, lol, player will respawn if you change team
Try this one.
Spoiler >

I hope its help.

old Re: Little script

MikuAuahDark
User Off Offline

Quote
user Devil-Thanh has written
1
2
3
4
addhook("die","p_die")
function p_die(id)
parse("spawnplayer "..id.." "..player(id,"x").." "..player(id,"y"))
end
havent tested. tell me if it doesn't work.

And it gonna spawn without any weapons at all. use cs2d lua cmd timer to spawn it

1
2
3
4
5
6
addhook("die","playerdie")
function playerdie(id,pl,w,x,y)
	timer(20,"parse","spawnplayer "..id.." "..x.." "..y)
	-- timerEx version
	-- timerEx(20,parse,1,"spawnplayer "..id.." "..x.." "..y)
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview