whiteblXK
Active Member
Hello, can someone write script in C++ which will change player movement speed?
I have this script in lua:
I have this script in lua:
Code:
function adjustSpeed(cid) --put it in the lib, or not, your choose ;p
local skillID = 0
local speedPerLvl = 7
if not isPlayer(cid) then return end
doChangeSpeed(cid, -getCreatureSpeed(cid))
doChangeSpeed(cid, 200+(getPlayerSkillLevel(cid, skillID)*speedPerLvl))
end
function onLogin(cid)
adjustSpeed(cid)
return true
end
function onAdvance(cid, skill, oldLevel, newLevel)
adjustSpeed(cid)
return true
end