Postado Dezembro 26, 2012 12 anos Um Script que pro player falar "CREW" precisa ter X item, e quando ele falar "CREW" atraz do player, a vitima sai sangue dela e sai uma mensagem "xxxx" Eu tenho esse script crew aqui como base. local colors = { TEXTCOLOR_BLUE, -- cores das mesangens TEXTCOLOR_LIGHTBLUE, TEXTCOLOR_LIGHTGREEN, TEXTCOLOR_TEAL, TEXTCOLOR_PURPLE, TEXTCOLOR_PLATINUMBLUE, TEXTCOLOR_LIGHTGREY, TEXTCOLOR_DARKRED, TEXTCOLOR_RED, TEXTCOLOR_ORANGE, TEXTCOLOR_YELLOW, TEXTCOLOR_WHITE_EXP } function onSay(cid, words, param) local playerpos = getPlayerPosition(cid) local random = math.random(1, #colors) if math.max(math.abs(playerpos.x-23), math.abs(playerpos.y-30)) < 9999 then doSendAnimatedText(playerpos, "Crew", colors[random]) doSendMagicEffect(topos, 5) return 1 end return 1 end (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Dezembro 26, 2012 12 anos So usar assim . n testei . local colors = { TEXTCOLOR_BLUE, -- cores das mesangens TEXTCOLOR_LIGHTBLUE, TEXTCOLOR_LIGHTGREEN, TEXTCOLOR_TEAL, TEXTCOLOR_PURPLE, TEXTCOLOR_PLATINUMBLUE, TEXTCOLOR_LIGHTGREY, TEXTCOLOR_DARKRED, TEXTCOLOR_RED, TEXTCOLOR_ORANGE, TEXTCOLOR_YELLOW, TEXTCOLOR_WHITE_EXP } function onSay(cid, words, param) local playerpos = getPlayerPosition(cid) local random = math.random(1, #colors) if math.max(math.abs(playerpos.x-23), math.abs(playerpos.y-30)) < 9999 then if getPlayerItemCount(cid) <= 5271 then -- id do item doPlayerAddItem(cid,1903) doSendAnimatedText(playerpos, "Crew", colors[random]) doSendMagicEffect(topos, 5) return 1 end return 1 end end Att, Skyligh Entrada Como Membro 14 / 08 / 2012 Entrada Como Suporte 05 / 12 / 2012 Saída Como Suporte 06 / 01 / 2013 Contato : [email protected] / [email protected]
Postado Dezembro 26, 2012 12 anos Autor Deu erro, de função: "attempt to compare boolean with number" (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Dezembro 26, 2012 12 anos tente assim . local colors = { TEXTCOLOR_BLUE, -- cores das mesangens TEXTCOLOR_LIGHTBLUE, TEXTCOLOR_LIGHTGREEN, TEXTCOLOR_TEAL, TEXTCOLOR_PURPLE, TEXTCOLOR_PLATINUMBLUE, TEXTCOLOR_LIGHTGREY, TEXTCOLOR_DARKRED, TEXTCOLOR_RED, TEXTCOLOR_ORANGE, TEXTCOLOR_YELLOW, TEXTCOLOR_WHITE_EXP } local id = 1938 -- id do item function onSay(cid, words, param) local playerpos = getPlayerPosition(cid) local random = math.random(1, #colors) if math.max(math.abs(playerpos.x-23), math.abs(playerpos.y-30)) < 9999 then if getPlayerItemCount(cid,id) then doPlayerAddItem(cid,1903) doSendAnimatedText(playerpos, "Crew", colors[random]) doSendMagicEffect(topos, 5) return 1 end return 1 end end Att, Skyligh Entrada Como Membro 14 / 08 / 2012 Entrada Como Suporte 05 / 12 / 2012 Saída Como Suporte 06 / 01 / 2013 Contato : [email protected] / [email protected]
Postado Dezembro 26, 2012 12 anos Autor Não fumfo, e não deu nenhum erro (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.