Ir para conteúdo
  • 0
Otfun

Scripting Storage Vip Script

Pergunta

Otfun    0
Otfun

altera script pra só quem tiver storage 85258 pode usar q é o storage do meu vip.... e tirar o bloqueio pelas vocação q estão e fica só pelo storage vip
 

local vocs = {9, 10, 11, 12}
local failout = {73,75,302,266,45,10} -- outfits proibidas

function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if not isInArray(vocs, getPlayerVocation(cid)) then
doPlayerSendCancel(cid,"Sua vocação não pode usar este comando.")
elseif(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
elseif not(t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
elseif isInArray(failout, t[1]) then
doPlayerSendCancel(cid,"Não pode usar estas outfit.")
elseif(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")
else
local tmp = getCreatureOutfit(cid)
tmp.lookType = t[1]
doCreatureChangeOutfit(cid, tmp)
end
return true
end
Editado por gpedro
adicionado tag code

Compartilhar este post


Link para o post

2 respostass a esta questão

Recommended Posts

  • 0
Anderkrox    23
Anderkrox

Não testei, mas creio que vai funcionar:

local vipStorage = 85258
local failout = {73, 75, 302, 266, 45, 10} -- outfits proibidas
 
function onSay(cid, words, param, channel)
	local t = string.explode(param, ",")
	t[1] = tonumber(t[1])
	if getPlayerStorageValue(cid, vipStorage) <= 0 then
		doPlayerSendCancel(cid,"Apenas VIPs para usar este comando.")
	elseif(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este comando precisa um parametro.")
	elseif not(t[1]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O comando precisa um parametro numerico.")
	elseif isInArray(failout, t[1]) then
		doPlayerSendCancel(cid,"Nao pode usar estas outfit.")
	elseif(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Esta outfit nao existe.")
	else
		local tmp = getCreatureOutfit(cid)
		tmp.lookType = t[1]
		doCreatureChangeOutfit(cid, tmp)
	end
	return false -- Quando retorna falso, não aparece o jogador falando o comando.
end

Compartilhar este post


Link para o post
Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×