Postado Março 10, 2018 7 anos function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local msg = "Coloque aqui a msg que irá aparecer no default" -- entre aspas local id = 2184 --- aqui vai o id da wand local a = table[param] if not a and param ~= "help" then doPlayerSendTextMessage(cid, 28, "Digite !wand help para saber os elementos disponiveis") return true end if (param == "help") then doPlayerSendTextMessage(cid, 27, msg) return true end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end
Postado Março 10, 2018 7 anos Autor Em 10/03/2018 em 16:00, Sttorm disse: function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local msg = "Coloque aqui a msg que irá aparecer no default" -- entre aspas local id = 2184 --- aqui vai o id da wand local a = table[param] if not a and param ~= "help" then doPlayerSendTextMessage(cid, 28, "Digite !wand help para saber os elementos disponiveis") return true end if (param == "help") then doPlayerSendTextMessage(cid, 27, msg) return true end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end Funcionou , Mano vc é foda valeu ai. + um rep agr queria tipo ao inves da msg de default fosse azul , queria ela em laranja
Postado Março 10, 2018 7 anos Mude de doPlayerSendTextMessage(cid, 27, msg) Para doPlayerSendTextMessage(cid, 20, msg)
Postado Março 10, 2018 7 anos Autor @Sttorm , eu tbm gostaria q so pudesse da o !wand help , qm tivesse a wand vip
Postado Março 10, 2018 7 anos function onSay(cid, words, param) local param = string.lower(param) local table = { ["fire"] = 12031, ["ice"] = 12032, ["earth"] = 12033, ["death"] = 12034, ["energy"] = 12035, ["holy"] = 12036 } local msg = "Coloque aqui a msg que irá aparecer no default" -- entre aspas local id = 2184 --- aqui vai o id da wand local a = table[param] local itemid = 2184 -- id da wand vip if not getPlayerItemCount(cid, itemid) > 0 then doPlayerSendTextMessage(cid, 28, "Você precisa ter uma wand vip na BP") return true end if not a and param ~= "help" then doPlayerSendTextMessage(cid, 28, "Digite !wand help para saber os elementos disponiveis") return true end if (param == "help") then doPlayerSendTextMessage(cid, 270, msg) return true end if getPlayerItemCount(cid, id) >= 1 then setPlayerStorageValue(cid, 12031, 0) setPlayerStorageValue(cid, 12032, 0) setPlayerStorageValue(cid, 12033, 0) setPlayerStorageValue(cid, 12034, 0) setPlayerStorageValue(cid, 12035, 0) setPlayerStorageValue(cid, 12036, 0) setPlayerStorageValue(cid, a, 1) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. param .. ".") else doPlayerSendTextMessage(cid, 28, "Desculpe, mais você precisa ter a ".. getItemNameById(id) .. " para trocar o elemento.") end return true end
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.