Forum

> > CS2D > Scripts > how to do own lua
Forums overviewCS2D overview Scripts overviewLog in to reply

English how to do own lua

5 replies
To the start Previous 1 Next To the start

old Re: how to do own lua

KimKat
GAME BANNED Off Offline

Quote
Here's a Lua for you.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("spawn","spawn_player")
function spawnplayer(p)
	plz = player(p,"exists")
	plx = player(p,"name")
	if plz then
		parse("speedmod "..p.." -20")
	elseif (plx == "Noob") then
		parse("speedmod "..p.." -10")
	elseif (plx == "Newbie") then
		parse("speedmod "..p.." -5")
	elseif (plx == "Player") then
		parse("speedmod "..p.." 0")
	end
end
Just something ridiculous for a ridiculous thread.

Admin/mod comment

script is bugged.. (spawnplayer <> spawn_player)

old Re: how to do own lua

TimeQuesT
User Off Offline

Quote
KimKat7 has written
Here's a Lua for you.
1
2
3
4
5
6
7
8
9
addhook("spawn","spawn_player")
function spawnplayer(p)
	plz = player(p,"exists")
	plx = player(p,"name")
	if plz then  			<-- always will return "true" an execute speedmod -20.
		parse("speedmod "..p.." -20")
	elseif (plx == "Noob") then
		parse("speedmod "..p.." -10")
.......................
Just something ridiculous for a ridiculous thread.


M0ar BuGs.

ontopic:
if you are using windos:
right-click-->new txt file-->save it with the edning ".lua" example:
test.lua
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview