A script that lets your players be faster.
--------------------------------------------------
-- 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 assnow.lua, then run the map assnow), and then it will be activated! (In that map only, thoguh.)

