• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

doCreatureSetNoMove(cid,allow) tfs 1.x

Sir Islam

Never Give Up
Joined
Jun 6, 2008
Messages
504
Solutions
1
Reaction score
116
Location
Suez , Egypt
how to use it

doCreatureSetNoMove(cid,true)
doCreatureSetNoMove(cid,false)

Code:
function doCreatureSetNoMove(cid,allow)
if allow then
local speed = Player(cid):getSpeed()
Player(cid):changeSpeed(-speed)
      else
    doChangeSpeed(cid, getSpeed(cid, getPlayerLevel(cid)) - getCreatureSpeed(cid))
end
end

function getSpeed(cid,level)
  value = (220 +(2 *(level -1)))
  return value
end
 
yes in global.lua or libs files

this make player cant move or move you can use it in freeze player
 
tfs 10.x? I left otland and it was tfs 1.1, now many years have passed already and @Mark is at tfs 10.x version already :eek::eek::eek:
 
no this make your speed 0 this if true if you set it false will back to normal speed by your level :)
 
ehm?
If i recall player userdata speed cant go below 0 in TFS 1.x. minimum is 1. which means player can move but it takes him ~150seconds to step from 1 tile to second.
I might be wrong though. Correct me if im wrong.
 
Back
Top