Postado Março 11, 2017 8 anos Fala galera, tenho esse script abaixo de repair de soft e fire, alguém pode adicionar algumas mensagem? Primeiro, se você não tem item na bp etc, não pode usar o comando, "Você não tem uma soft boots ou firewalker boots." , segundo, aparecer mensagem ao player se ele não tiver a quantia X para renovar, e uma mensagem quando for renovada. --[[ script By Subwat Reparar soft e firewalker!]]-- function onSay(cid, words, param) local config = { price = 100000, new_soft = 6132, -- id da nova soft boots worn_soft = 10021, -- id da velha soft boots new_firewalker = 9933, -- id da firewalker boots worn_firewalker = 10022, -- id da velha firewalker boots needPremium = true -- se precisa ser premium (true or false) } if (config.needPremium == true) and (not isPremium(cid)) then doPlayerSendTextMessage(cid, 23, "desculpe apenas Premium players podem recarregar Suas Botas.") return TRUE end if param == "soft" then if getPlayerItemCount(cid, config.worn_soft) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_soft,1) doPlayerAddItem(cid,config.new_soft, 1) end end return TRUE end if param == "firewalker" then if getPlayerItemCount(cid, config.worn_firewalker) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_firewalker,1) doPlayerAddItem(cid,config.new_firewalker, 1) end end return TRUE end end (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 11, 2017 8 anos --[[ script By Subwat Reparar soft e firewalker!]]-- function onSay(cid, words, param) local config = { price = 100000, new_soft = 6132, -- id da nova soft boots worn_soft = 10021, -- id da velha soft boots new_firewalker = 9933, -- id da firewalker boots worn_firewalker = 10022, -- id da velha firewalker boots needPremium = true -- se precisa ser premium (true or false) } local boots = 0; if (config.needPremium == true) and (not isPremium(cid)) then doPlayerSendTextMessage(cid, 23, "desculpe apenas Premium players podem recarregar Suas Botas.") return TRUE end if param == "soft" then if getPlayerItemCount(cid, config.worn_soft) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_soft,1) doPlayerAddItem(cid,config.new_soft, 1) doSendAnimatedText(cid, "Sua soft foi renovada", TEXTCOLOR_BLUE) else doSendAnimatedText(cid, "Voce nao possui dinheiro", TEXTCOLOR_RED) end else boots = boots + 1 end return TRUE end if param == "firewalker" then if getPlayerItemCount(cid, config.worn_firewalker) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_firewalker,1) doSendAnimatedText(cid, "Sua firewalker foi renovada", TEXTCOLOR_BLUE) doPlayerAddItem(cid,config.new_firewalker, 1) else doSendAnimatedText(cid, "Voce nao possui dinheiro", TEXTCOLOR_RED) end else boots = boots + 1 end return TRUE end if boots == 2 then doSendAnimatedText(cid, "Voce precisa de uma soft ou uma firewalker boots", TEXTCOLOR_RED) end end Editado Março 11, 2017 8 anos por rogaforyn2 (veja o histórico de edições) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 11, 2017 8 anos Autor 16 minutos atrás, rogaforyn2 disse: --[[ script By Subwat Reparar soft e firewalker!]]-- function onSay(cid, words, param) local config = { price = 100000, new_soft = 6132, -- id da nova soft boots worn_soft = 10021, -- id da velha soft boots new_firewalker = 9933, -- id da firewalker boots worn_firewalker = 10022, -- id da velha firewalker boots needPremium = true -- se precisa ser premium (true or false) } local boots = 0; if (config.needPremium == true) and (not isPremium(cid)) then doPlayerSendTextMessage(cid, 23, "desculpe apenas Premium players podem recarregar Suas Botas.") return TRUE end if param == "soft" then if getPlayerItemCount(cid, config.worn_soft) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_soft,1) doPlayerAddItem(cid,config.new_soft, 1) doSendAnimatedText(cid, "Sua soft foi renovada", TEXTCOLOR_BLUE) else doSendAnimatedText(cid, "Voce nao possui dinheiro", TEXTCOLOR_RED) end else boots = boots + 1 end return TRUE end if param == "firewalker" then if getPlayerItemCount(cid, config.worn_firewalker) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_firewalker,1) doSendAnimatedText(cid, "Sua firewalker foi renovada", TEXTCOLOR_BLUE) doPlayerAddItem(cid,config.new_firewalker, 1) else doSendAnimatedText(cid, "Voce nao possui dinheiro", TEXTCOLOR_RED) end else boots = boots + 1 end return TRUE end if boots == 2 then doSendAnimatedText(cid, "Voce precisa de uma soft ou uma firewalker boots", TEXTCOLOR_RED) end end Deu erro no SendAnimatedText, não sai nenhuma das mensagem, a soft recarrega, e a firewalker boots some ao usar o comando. (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Março 11, 2017 8 anos Ah, peraí, confundi o comando: @jNo --[[ script By Subwat Reparar soft e firewalker!]]-- function onSay(cid, words, param) local config = { price = 100000, new_soft = 6132, -- id da nova soft boots worn_soft = 10021, -- id da velha soft boots new_firewalker = 9933, -- id da firewalker boots worn_firewalker = 10022, -- id da velha firewalker boots needPremium = true -- se precisa ser premium (true or false) } local boots = 0; if (config.needPremium == true) and (not isPremium(cid)) then doPlayerSendTextMessage(cid, 23, "desculpe apenas Premium players podem recarregar Suas Botas.") return TRUE end if param == "soft" then if getPlayerItemCount(cid, config.worn_soft) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_soft,1) doPlayerAddItem(cid,config.new_soft, 1) doPlayerSendTextMessage(cid, 23, "Sua soft foi renovada.") else doPlayerSendTextMessage(cid, 23, "Voce nao possui dinheiro.") end else boots = boots + 1 end return TRUE end if param == "firewalker" then if getPlayerItemCount(cid, config.worn_firewalker) >= 1 then if doPlayerRemoveMoney(cid,config.price) == TRUE then doPlayerRemoveItem(cid,config.worn_firewalker,1) doPlayerAddItem(cid,config.new_firewalker, 1) doPlayerSendTextMessage(cid, 23, "Sua firewalker foi renovada") else doPlayerSendTextMessage(cid, 23, "Voce nao possui dinheiro.") end else boots = boots + 1 end return TRUE end if boots == 2 then doPlayerSendTextMessage(cid, 23, "Voce precisa de uma soft ou uma firewalker boots") end end Esqueci que o doSendAnimatedText requer posição, troquei pra aparecer pro jogador. Editado Março 11, 2017 8 anos por rogaforyn2 (veja o histórico de edições) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Março 11, 2017 8 anos Autor Funcional, só não mostra a ultima mensagem caso não tenha os boots. if boots == 2 then doPlayerSendTextMessage(cid, 23, "Voce precisa de uma soft ou uma firewalker boots") end (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
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.