Postado Julho 23, 2014 10 anos Queria que alguém colocasse uma função nessa script que quando o player estive usando a bike não poderá usar Fly, Ride ou Surf tentei assim mais não deu:: if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then doPlayerSendCancel(cid, "Voce nao pode usar a bike enquanto estiver no ride/fly/surf.") return true end bike.lua local config = { velocidadeDaSuaBike = 999, -- A volocidade da bike (1-9) outfitMale = 1787, -- Outfit male outfitFemale = 1618, -- Outfit female 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 local a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."") doSendMagicEffect(getThingPos(cid), 18) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, config.velocidadeDaSuaBike) 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), 18) doRemoveCondition(cid, CONDITION_OUTFIT) doRegainSpeed(cid) end return true end Editado Julho 23, 2014 10 anos por TopllDanStar (veja o histórico de edições)
Postado Julho 23, 2014 10 anos Tenta usar essa script aki: local function BikeSpeedOn(cid, t) setPlayerStorageValue(cid, t.s, t.speed) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, t.speed) end local function BikeSpeedOff(cid, t) setPlayerStorageValue(cid, t.s, -1) doRegainSpeed(cid) end function onUse(cid, item, fromPosition, itemEx, toPosition) local pos = getThingPos(cid) local t = {text='Subindo na bike!', dtext='Desecendo da, bike!', s=9700, speed = 1000} --if #getCreatureSummons(cid) >= 1 then --return doPlayerSendCancel(cid, "Return your pokemon.") --end if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then return doPlayerSendCancel(cid, "Voce nao pode usar a bike enquanto estiver no ride/fly/surf.") end if getPlayerStorageValue(cid, t.s) <= 0 then doSendMagicEffect(pos, 173) doCreatureSay(cid, t.text, 19) --doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted in a bike.') BikeSpeedOn(cid, t) if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1581}, -1) else doSetCreatureOutfit(cid, {lookType = 1581}, -1) end else doSendMagicEffect(pos, 173) doCreatureSay(cid, t.dtext, 19) --doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted of a bike.') BikeSpeedOff(cid, t) doRemoveCondition(cid, CONDITION_OUTFIT) end return true end Meus Contatos! Minhas Funções: Skype: TsplayerT Facebook: TakaFukushii YouTube: ADoseDupla Twitter: @_Splayer_ Mapper:▓▓▓▓▓▓▓▓▓▓ 97% Programmer:▓▓▓▓▓▒▒▒▒▒ 45% Scripter:▓▓▓▓▓▓▓▓▓▒ 83% Spriter:▓▓▓▓▓▓▒▒▒▒ 57% Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99% Ot Creator:▓▓▓▓▓▓▓▒▒▒71% Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%
Postado Julho 23, 2014 10 anos Autor Mais eu só quero que adicionem essa função na minha script, pois quero usar a minha script mesmo assim rep+ Editado Julho 23, 2014 10 anos por TopllDanStar (veja o histórico de edições)
Postado Julho 23, 2014 10 anos tenta ai local config = {velocidadeDaSuaBike = 999, -- A volocidade da bike (1-9)outfitMale = 1787, -- Outfit maleoutfitFemale = 1618, -- Outfit femalestorageValue = 5602, -- Storage Para a bike}function onUse(cid, item, itemEx, fromPosition, toPosition)if isPlayer(cid) and getCreatureOutfit(cid).lookType == 814 then return false endif getPlayerStorageValue(cid, config.storageValue) <= 0 thenlocal a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."")doSendMagicEffect(getThingPos(cid), 18)doChangeSpeed(cid, -getCreatureSpeed(cid))doChangeSpeed(cid, config.velocidadeDaSuaBike)setPlayerStorageValue(cid, config.storageValue, 1)if getPlayerSex(cid) == 0 thendoSetCreatureOutfit(cid, b, -1)elsedoSetCreatureOutfit(cid, a, -1)endelsesetPlayerStorageValue(cid, config.storageValue, 0)doSendMagicEffect(getThingPos(cid), 18)doRemoveCondition(cid, CONDITION_OUTFIT) ifplayer user(cancel)doRegainSpeed(cid)endreturn trueend Editado Julho 23, 2014 10 anos por JonatasLucasf (veja o histórico de edições) CONQUISTAS
Postado Julho 23, 2014 10 anos Autor tenta ai local config = { velocidadeDaSuaBike = 999, -- A volocidade da bike (1-9) outfitMale = 1787, -- Outfit male outfitFemale = 1618, -- Outfit female 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 local a = {lookType = config.outfitMale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} local b = {lookType = config.outfitFemale, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet} setPlayerStorageValue(cid, 3624, ""..getPlayerStamina(cid).."") doSendMagicEffect(getThingPos(cid), 18) doChangeSpeed(cid, -getCreatureSpeed(cid)) doChangeSpeed(cid, config.velocidadeDaSuaBike) 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), 18) doRemoveCondition(cid, CONDITION_OUTFIT) ifplayer user(cancel) doRegainSpeed(cid) end return true end obrigado por tenta mais não funcionou da um erro sobre ifplayeruse
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.