Postado Novembro 28, 2016 8 anos Boa noite, Pessoal Gostaria de adicionar um custo para usar o comando !fly nas localidades a baixo exemplo: Carlin = R$: 100 Gold (msg: você nao tem dinheiro para viajar) > o player nao tem dinheiro para viajar Venore = R$: 100 Gold (tendo o gold ! -> o player vai até o destino referente as coordenadas a baixo são de um mapa de teste. (Será que podem me ajudar?) Carlin = {x= 150, y= 150, z= 7} Thais = {x= 141, y= 150, z= 7} Venore = {x= 158, y= 150, z= 7} function onSay(cid, words, param, channel) local days = getPlayerPremiumDays(cid) if days == 0 or days <= 1 then doPlayerSendCancel(cid, 'Necessário premium account pra poder usar o Fly.') end if getTilePzInfo(getPlayerPosition(cid)) then if (param == 'Thais') then doTeleportThing(cid, Thais) doSendMagicEffect(getPlayerPosition(cid), 10) elseif (param == 'Carlin') then doTeleportThing(cid, Carlin) doSendMagicEffect(getPlayerPosition(cid), 10) elseif (param == 'Venore') then doTeleportThing(cid, Venore) doSendMagicEffect(getPlayerPosition(cid), 10) else local str = "(Carlin , Thais , Venore) " doShowTextDialog(cid, 2160, str) end else doPlayerSendCancel(cid, "Voce so pode em area pz.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end Editado Novembro 28, 2016 8 anos por Gordongordon (veja o histórico de edições)
Postado Novembro 28, 2016 8 anos Quando eu entrar se ngm tiver feito, eu faço Enviado de meu SM-J105B usando Tapatalk @This life is filled with hurt When happiness doesn't work Trust me and take my hand When the lights go out you will understand
Postado Novembro 28, 2016 8 anos Solução 2 horas atrás, login12 disse: Quando eu entrar se ngm tiver feito, eu faço Enviado de meu SM-J105B usando Tapatalk Q viado vc é HUIEWHUIEHWUI Vou fazer para ele, meu mestre HUEHEUHEUHEUHEUHE Carlin = {x= 150, y= 150, z= 7} Thais = {x= 141, y= 150, z= 7} Venore = {x= 158, y= 150, z= 7} valor_carlin = 100 valor_thais = 100 valor_venore = 100 function onSay(cid, words, param, channel) local days = getPlayerPremiumDays(cid) if days == 0 or days <= 1 then doPlayerSendCancel(cid, 'Necessário premium account pra poder usar o Fly.') end if getTilePzInfo(getPlayerPosition(cid)) then if (param == 'Thais') then if getPlayerMoney(cid) >= 1 then -- checa money doPlayerRemoveMoney(cid, valor_thais) -- remove money doTeleportThing(cid, Thais) doSendMagicEffect(getPlayerPosition(cid), 10) end elseif (param == 'Carlin') then if getPlayerMoney(cid) >= 1 then -- checa money doPlayerRemoveMoney(cid, valor_carlin) -- remove money doTeleportThing(cid, Carlin) doSendMagicEffect(getPlayerPosition(cid), 10) end elseif (param == 'Venore') then if getPlayerMoney(cid) >= 1 then -- checa money doPlayerRemoveMoney(cid, valor_venore) -- remove money doTeleportThing(cid, Venore) doSendMagicEffect(getPlayerPosition(cid), 10) end else local str = "(Carlin , Thais , Venore) " doShowTextDialog(cid, 2160, str) end else doPlayerSendCancel(cid, "Voce so pode em area pz.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end Editado Novembro 28, 2016 8 anos por Subyth (veja o histórico de edições)
Postado Novembro 28, 2016 8 anos 20 minutos atrás, Subyth disse: Q viado vc é HUIEWHUIEHWUI Vou fazer para ele, meu mestre HUEHEUHEUHEUHEUHE Carlin = {x= 150, y= 150, z= 7} Thais = {x= 141, y= 150, z= 7} Venore = {x= 158, y= 150, z= 7} valor_carlin = 100 valor_thais = 100 valor_venore = 100 function onSay(cid, words, param, channel) local days = getPlayerPremiumDays(cid) if days == 0 or days <= 1 then doPlayerSendCancel(cid, 'Necessário premium account pra poder usar o Fly.') end if getTilePzInfo(getPlayerPosition(cid)) then if (param == 'Thais') then if getPlayerMoney(cid) >= 1 then -- checa money doPlayerRemoveMoney(cid, valor_thais) -- remove money doTeleportThing(cid, Thais) doSendMagicEffect(getPlayerPosition(cid), 10) end elseif (param == 'Carlin') then if getPlayerMoney(cid) >= 1 then -- checa money doPlayerRemoveMoney(cid, valor_carlin) -- remove money doTeleportThing(cid, Carlin) doSendMagicEffect(getPlayerPosition(cid), 10) end elseif (param == 'Venore') then if getPlayerMoney(cid) >= 1 then -- checa money doPlayerRemoveMoney(cid, valor_venore) -- remove money doTeleportThing(cid, Venore) doSendMagicEffect(getPlayerPosition(cid), 10) end else local str = "(Carlin , Thais , Venore) " doShowTextDialog(cid, 2160, str) end else doPlayerSendCancel(cid, "Voce so pode em area pz.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end Você só esqueceu de arrumar aqui: if getPlayerMoney(cid) >= 1 then -- checa money Devia utilizar ai a variavel que você registrou la em cima, ficando assim: if getPlayerMoney(cid) >= valor_thais then -- checa money Arruma aí em todas as citys pro guri D: @This life is filled with hurt When happiness doesn't work Trust me and take my hand When the lights go out you will understand
Postado Novembro 28, 2016 8 anos AAlá '-' Carlin = {x= 150, y= 150, z= 7} Thais = {x= 141, y= 150, z= 7} Venore = {x= 158, y= 150, z= 7} valor_carlin = 100 valor_thais = 100 valor_venore = 100 function onSay(cid, words, param, channel) local days = getPlayerPremiumDays(cid) if days == 0 or days <= 1 then doPlayerSendCancel(cid, 'Necessário premium account pra poder usar o Fly.') end if getTilePzInfo(getPlayerPosition(cid)) then if (param == 'Thais') then if getPlayerMoney(cid) >= valor_thais then -- checa money doPlayerRemoveMoney(cid, valor_thais) -- remove money doTeleportThing(cid, Thais) doSendMagicEffect(getPlayerPosition(cid), 10) end elseif (param == 'Carlin') then if getPlayerMoney(cid) >= valor_carlin then -- checa money doPlayerRemoveMoney(cid, valor_carlin) -- remove money doTeleportThing(cid, Carlin) doSendMagicEffect(getPlayerPosition(cid), 10) end elseif (param == 'Venore') then if getPlayerMoney(cid) >= valor_venore then -- checa money doPlayerRemoveMoney(cid, valor_venore) -- remove money doTeleportThing(cid, Venore) doSendMagicEffect(getPlayerPosition(cid), 10) end else local str = "(Carlin , Thais , Venore) " doShowTextDialog(cid, 2160, str) end else doPlayerSendCancel(cid, "Voce so pode em area pz.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) end end ta ae Editado Novembro 28, 2016 8 anos por Subyth (veja o histórico de edições)
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.