gamigo's speedy script

--------------------------------------------------
-- Speedy Players Lua Script by gamigo          --
-- Makes players be faster by slecting intensity--
--------------------------------------------------

if sample==nil then sample={} end
sample.classes={}

-----------------------
-- Commencing...     --
-----------------------
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
sample.classes.class=initArray(32)
function sample.classes.classmenu(id)
	menu(id,"Select Intensity,1|15ms,2|20ms,3|30ms,4|40ms,Ultra|50ms")	
end


-----------------------
-- Team and Intensity--
-----------------------
addhook("team","sample.classes.team")
function sample.classes.team(id,team)
	if (team>0) then
		sample.classes.classmenu(id)
	end
end


-----------------------
-- Server Action     --
-----------------------
addhook("serveraction","sample.classes.serveraction")
function sample.classes.serveraction(id)
	sample.classes.classmenu(id)
end


-----------------------
-- Intensity Menu    --
-----------------------
addhook("menu","sample.classes.menu")
function sample.classes.menu(id,menu,sel)
	if (menu=="Select Intensity") then
		if (sel>=0 and sel<=5) then
			sample.classes.class[id]=sel
			if (player(id,"health")>0) then
				parse("killplayer "..id)
			end
		end
	end
end


-----------------------
-- Intensities       --
-----------------------
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
	-- Intensity 1
	if (sample.classes.class[id]<=1) then
		parse ("speedmod "..id.." 15")
	end
	-- Intensity 2
	if (sample.classes.class[id]==2) then
		parse ("speedmod "..id.." 20")
	end
	-- Intensity 3
	if (sample.classes.class[id]==3) then
		parse ("speedmod "..id.." 30")
	end
	-- Intensity 4
	if (sample.classes.class[id]==4) then
		parse ("speedmod "..id.." 40")
	end
	-- Are you nuts?
	if (sample.classes.class[id]==5) then
		parse ("speedmod "..id.." 50")
	end
end

This script will show a menu on startup making you choose what speed you want. It can be 15m/s(default), 20m/s, 30m/s, 40m/s, or Ultra, which is 50m/s!

I derived it from a sample script which is classes.lua but made it into this instead.

NOTE: You can choose it to be a LUA file. Just opn a LUA file with notepad, delete all contents, and paste the script below, and save it. And you can rename it to [the name of the map you want the scipt activated at].lua and put it at the maps folder. Then, you can run CS2D and then the map where you named it also after the LUA file (say, you renamed the LUA file to as_snow.lua, then run the map as_snow), and then it will be activated! (In that map only, thoguh.)

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Script.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Script a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Script.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

None found

Credits

Key Authors
gamigo
editor of script
Original Authors
Unreal Software
the whole script

Submitter

gamigo avatar
Availability
Offline
Account Age Level
Veteran Age Level icon
Veteran
5 years old
Clearance Level
Member Clearance Level icon
Member

gamigo
(Creator/Co-creator)

Rating

?/10
Not yet rated.

Stats

Post Count
0
ViewCount
1,323
Date Added
5 years ago
Date Modified
5 years ago

License

N/A

Share

Code to use:

More embeddable images

Bookmark and Share