AnnaFeeh
Let her pass, or looks, or moves
I have a problem so when the player's use on the bike and ride again and after use and disassembles it stays at the same speed he was on the bike: (
could help?
bike.lua
could help?
bike.lua
Code:
-- [[ Bike Sistema 100% -- By SmiX ^}^ ]] --
--[[ • Ela deixa você mais rápido a partir da volocidade determinada no script + sua estamina.]]--
--[[ • Adiciona e remove outfit do player.]]--
--[[ #Lembrando todos os campos com variaveis escritas são preechidas com {"sim" ou "nao"}]]--
local config = {
textoAvisandoSuaVelocidade = "sim", -- Se você quiser que o script mande uma mensagem para o player dizendo a velocidade dele
velocidadeDaSuaBike = 999, -- A volocidade da bike, sempre bote números de 1 á 10. Caso bote mais que isso a volicidade vai ficar muito alta.
outfitMale = 1787, -- Outfit male
outfitFemale = 1618, -- Outfit female
efeito = 18, -- Efeito que ira aparescer quando der use.
storageValue = 5602, -- Storage Para a bike
}
function onUse(cid, item, itemEx, fromPosition, toPosition)
if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false end
if getPlayerStorageValue(cid, config.storageValue) <= 0 then
setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."")
a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}
doSendMagicEffect(getThingPos(cid), config.efeito)
speedRate = config.velocidadeDaSuaBike * 1000
doChangeSpeed(cid, speedRate + getPlayerStorageValue(cid, 3624))
setPlayerStorageValue(cid, config.storageValue, 1)
if getPlayerSex(cid) == 0 then
doSetCreatureOutfit(cid, b, -1)
else
doSetCreatureOutfit(cid, a, -1)
end
else
setPlayerStorageValue(cid, config.storageValue, 0)
doSendMagicEffect(getThingPos(cid), config.efeito)
doRemoveCondition(cid, CONDITION_OUTFIT)
retireSpeedRate = config.velocidadeDaSuaBike * 100
playerSpeedNow = -retireSpeedRate - getPlayerStorageValue(cid, 3624)
doChangeSpeed(cid, playerSpeedNow)
end
return TRUE
end