I do not know use the function:
doChangeSpeed
But I created a script where it's easy to someone help me ...
Speed1.LUA:
Speed2.LUA
Speed3.LUA
---
Easy, use the command:
/speed1 "on
/speed1 "off
/speed2 "on
/speed2 "off
/speed3 "on
/speed3 "off
---
It is impossible to enable more than one at the same time!
doChangeSpeed
But I created a script where it's easy to someone help me ...
Speed1.LUA:
PHP:
local yourSpeed = getCreatureSpeed(cid)
function onSay(cid, words, param)
if getPlayerGroupId(cid) > 2 then
doChangeSpeed(cid, yourSpeed + 200)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, Now his speed is '..getCreatureSpeed(cid)..'.)
end
else
doChangeSpeed(cid, yourSpeed - 200)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, Now his speed is '..getCreatureSpeed(cid)..'.)
end
end
PHP:
local yourSpeed = getCreatureSpeed(cid)
function onSay(cid, words, param)
if getPlayerGroupId(cid) > 2 then
doChangeSpeed(cid, yourSpeed + 400)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, Now his speed is '..getCreatureSpeed(cid)..'.)
end
else
doChangeSpeed(cid, yourSpeed - 400)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, Now his speed is '..getCreatureSpeed(cid)..'.)
end
end
PHP:
local yourSpeed = getCreatureSpeed(cid)
function onSay(cid, words, param)
if getPlayerGroupId(cid) > 2 then
doChangeSpeed(cid, yourSpeed + 600)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, Now his speed is '..getCreatureSpeed(cid)..'.)
end
else
doChangeSpeed(cid, yourSpeed - 600)
doPlayerSendTextMessage(cid, TALKTYPE_ORANGE_1, Now his speed is '..getCreatureSpeed(cid)..'.)
end
end
Easy, use the command:
/speed1 "on
/speed1 "off
/speed2 "on
/speed2 "off
/speed3 "on
/speed3 "off
---
It is impossible to enable more than one at the same time!