Forum

> > CS2D > Scripts > SpeedMod Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English SpeedMod Script

5 replies
To the start Previous 1 Next To the start

old SpeedMod Script

KagamineLen
User Off Offline

Quote
i decided to make a server named [PBS]RaceMode that the player needs to race till the finish line

but now i need a two script that

√ 1. All the players will be set to speed 100 but the speedmod will not expired even restart round or ct win execpt he left the game

√ 2. score systems when player xx reach the finish line he will be posted at the center ex. "MasterLenz Win The Race"

thnks for the script in advance

old Re: SpeedMod Script

Necr0
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function InitArray(m,val)
array={}
	for i=1,m do
	array[i]=val
	end
return array
end

if (race==nil) then race={} end
if (race.score) then race.score={} end

race.score=InitArray(32,0)

addhook("spawn","speed")
function speed(id)
	parse("speedmod "..id.." 100")
	showscore(id)
end

function showscore(id)
txt = ("score : "..race.score[id])
x = 15
y = 430
parse('hudtxt2 '..id..' 1 "'..txt..'" '..x..' '..y)
end

addhook("movetile","score")
function score(id,x,y)
xx=9     --change x
yy=9     --change y
	if x==xx and y==yy then
		race.score[id] = (race.score[id]+1)
		msg(player(id,"name").." won the race! @C")
		parse("restartround")
		showscore(id)
	end
end

addhook("leave","resetscore")
function resetscore(id)
	race.score[id] = 0
end

--edit--
now tested and bugless
edited 3×, last 11.08.11 11:15:28 pm

old Re: SpeedMod Script

Apache uwu
User Off Offline

Quote
Speedmod is client sided, so lag shouldn't affect anything.--unless they have sky-high ping lolz

old Re: SpeedMod Script

Necr0
User Off Offline

Quote
you are right Textual Context
if this would lag very much imagine how much weiwens tibia script would lag
ArthurSmith i hope you like my script

old Re: SpeedMod Script

EnderCrypt
User Off Offline

Quote
on these RACE maps, just the slightest lagg can make you lose, running 5% slower is more then enough sometimes for you to lose
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview