Ir para conteúdo

queria um script que trocasse a cor do outfit que o ADM esta usando

Featured Replies

  • Respostas 11
  • Visualizações 906
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Em talkactions, crie um arquivo chamado rainbow.lua e poem isso dentro.       e poem essa tag no talkactions.xml <talkaction log="yes" access="6" words="!rainbow" event="

Posted Images

Postado
2 horas atrás, ADM Mayk on BaiakME disse:

TFS 0.4 

8.6

Exemplo ADM usa o comando !adm on é se ele estiver com outfit citizen ficar mudando de cores ! é pra desligar o comando !adm off

comando apenas para group id 6 ....

 

 

 

Em talkactions, crie um arquivo chamado rainbow.lua e poem isso dentro.

 

Spoiler

local colors = {94, 81, 79, 88, 18, 11, 92, 128}

local storage = 65535
local time = 10 --in miliseconds
 
function onSay(cid, words, param, channel)
 
if(param == "on") then
if getPlayerStorageValue(cid, storage) < 1 then
if doPlayerRemoveMoney(cid, 0) == TRUE then
local event = addEvent(changeOutfit, time, cid)
setPlayerStorageValue(cid, storage, 1)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.")
return TRUE
end
else
return TRUE
end
elseif(param == "off") then
if getPlayerStorageValue(cid, storage) > 0 then
setPlayerStorageValue(cid, storage, 0)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have rainbow outfit on.")
return TRUE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use !rainbow on-off.")
return TRUE
end
return TRUE
end
 
function changeOutfit(cid)
 
local randomHead = colors[math.random(#colors)]
local randomLegs = colors[math.random(#colors)]
local randomBody = colors[math.random(#colors)]
local randomFeet = colors[math.random(#colors)]
local tmp = {}
 
if getPlayerStorageValue(cid, storage) > 0 then
local outfit = getCreatureOutfit(cid)
tmp = outfit
tmp.lookType = outfit.lookType
tmp.lookHead = randomHead
tmp.lookLegs = randomLegs
tmp.lookBody = randomBody
tmp.lookFeet = randomFeet
tmp.lookAddons = outfit.lookAddons
 
doCreatureChangeOutfit(cid, tmp)
local event = addEvent(repeatChangeOutfit, time, cid)
return TRUE
else
stopEvent(event)
return TRUE
end
end
 
function repeatChangeOutfit(cid)
 
local randomHead = colors[math.random(#colors)]
local randomLegs = colors[math.random(#colors)]
local randomBody = colors[math.random(#colors)]
local randomFeet = colors[math.random(#colors)]
local tmp = {}
 
if getPlayerStorageValue(cid, storage) > 0 then
local outfit = getCreatureOutfit(cid)
tmp = outfit
tmp.lookType = outfit.lookType
tmp.lookHead = randomHead
tmp.lookLegs = randomLegs
tmp.lookBody = randomBody
tmp.lookFeet = randomFeet
tmp.lookAddons = outfit.lookAddons
 
doCreatureChangeOutfit(cid, tmp)
local event = addEvent(changeOutfit, time, cid)
return TRUE
else
stopEvent(event)
return TRUE
end
end

 

 

e poem essa tag no talkactions.xml

<talkaction log="yes" access="6" words="!rainbow" event="script" value="rainbow.lua"/>

 

se ele não funcionar poem esse aqui

<talkaction words="!rainbow" event="script" value="rainbow.lua"/>

mas esse é sem "ACESSO" qualquer um pode usar.

 

 

!rainbow on 

LIGA

 

!rainbow off

DESLIGA

       112674.gif

 

 

 

Postado
  • Autor
21 horas atrás, Zzyzx disse:

 

 

Em talkactions, crie um arquivo chamado rainbow.lua e poem isso dentro.

 

  Ocultar conteúdo

local colors = {94, 81, 79, 88, 18, 11, 92, 128}

local storage = 65535
local time = 10 --in miliseconds
 
function onSay(cid, words, param, channel)
 
if(param == "on") then
if getPlayerStorageValue(cid, storage) < 1 then
if doPlayerRemoveMoney(cid, 0) == TRUE then
local event = addEvent(changeOutfit, time, cid)
setPlayerStorageValue(cid, storage, 1)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.")
return TRUE
end
else
return TRUE
end
elseif(param == "off") then
if getPlayerStorageValue(cid, storage) > 0 then
setPlayerStorageValue(cid, storage, 0)
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have rainbow outfit on.")
return TRUE
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Use !rainbow on-off.")
return TRUE
end
return TRUE
end
 
function changeOutfit(cid)
 
local randomHead = colors[math.random(#colors)]
local randomLegs = colors[math.random(#colors)]
local randomBody = colors[math.random(#colors)]
local randomFeet = colors[math.random(#colors)]
local tmp = {}
 
if getPlayerStorageValue(cid, storage) > 0 then
local outfit = getCreatureOutfit(cid)
tmp = outfit
tmp.lookType = outfit.lookType
tmp.lookHead = randomHead
tmp.lookLegs = randomLegs
tmp.lookBody = randomBody
tmp.lookFeet = randomFeet
tmp.lookAddons = outfit.lookAddons
 
doCreatureChangeOutfit(cid, tmp)
local event = addEvent(repeatChangeOutfit, time, cid)
return TRUE
else
stopEvent(event)
return TRUE
end
end
 
function repeatChangeOutfit(cid)
 
local randomHead = colors[math.random(#colors)]
local randomLegs = colors[math.random(#colors)]
local randomBody = colors[math.random(#colors)]
local randomFeet = colors[math.random(#colors)]
local tmp = {}
 
if getPlayerStorageValue(cid, storage) > 0 then
local outfit = getCreatureOutfit(cid)
tmp = outfit
tmp.lookType = outfit.lookType
tmp.lookHead = randomHead
tmp.lookLegs = randomLegs
tmp.lookBody = randomBody
tmp.lookFeet = randomFeet
tmp.lookAddons = outfit.lookAddons
 
doCreatureChangeOutfit(cid, tmp)
local event = addEvent(changeOutfit, time, cid)
return TRUE
else
stopEvent(event)
return TRUE
end
end

 

 

e poem essa tag no talkactions.xml

<talkaction log="yes" access="6" words="!rainbow" event="script" value="rainbow.lua"/>

 

se ele não funcionar poem esse aqui

<talkaction words="!rainbow" event="script" value="rainbow.lua"/>

mas esse é sem "ACESSO" qualquer um pode usar.

 

 

!rainbow on 

LIGA

 

!rainbow off

DESLIGA

não da erro na database porem aparece essa msg

image.png.d88e79124883726fe1e38fd809b59a99.png

Postado
1 minuto atrás, ADM Mayk on BaiakME disse:

não da erro na database porem aparece essa msg

image.png.d88e79124883726fe1e38fd809b59a99.png

 

 

Uai tu pediu pra acesso 6 ai ta pra acesso 6, se teu char é menor que o acesso 6, vai dar esse erro ai

usa essa tag aqui

<talkaction log="yes" access="4" words="!rainbow" event="script" value="rainbow.lua"/>

       112674.gif

 

 

 

Postado
  • Autor
9 minutos atrás, Zzyzx disse:

 

 

Uai tu pediu pra acesso 6 ai ta pra acesso 6, se teu char é menor que o acesso 6, vai dar esse erro ai

usa essa tag aqui

<talkaction log="yes" access="4" words="!rainbow" event="script" value="rainbow.lua"/>

agora não pego não aparece nada no jogo nem muda de cor sqlite group id ta 6 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo