AD

Ajuda Script

Por Adriez, 16 de abr. de 2016 em Scripts

8
894
AdriezA
16 de abril de 2016 às 23:22

altera script pra só quem tiver storage 85258 pode usar q é o storage do meu vip....

--- script
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 

DanihcvD
16 de abril de 2016 às 23:45

Tenta ae:

local vocs = {9, 10, 11, 12}local failout = {73,75,302,266,45,10} -- outfits proibidaslocal storagevip = 85258 --storage da vipfunction onSay(cid, words, param, channel)local t = string.explode(param, ",")t[1] = tonumber(t[1])if not isInArray(vocs, getPlayerVocation(cid)) thendoPlayerSendCancel(cid,"Sua vocação não pode usar este comando.")elseif getPlayerStorageVocation(cid, storagevip) < os.time() thendoPlayerSendCancel(cid,"Você precisa ser VIP para usar este comando.")elseif(param == '') thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")elseif not(t[1]) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")elseif isInArray(failout, t[1]) thendoPlayerSendCancel(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) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")elselocal tmp = getCreatureOutfit(cid)tmp.lookType = t[1]doCreatureChangeOutfit(cid, tmp)endreturn trueend  

 

AdriezA
16 de abril de 2016 às 23:47

num expliquei direito mals ai é pra tirar as vocação o script pegar só pelo storage vip

DanihcvD
17 de abril de 2016 às 00:06

Vê se funfa:

local failout = {73,75,302,266,45,10} -- outfits proibidaslocal storagevip = 85258 --storage da vipfunction onSay(cid, words, param, channel)local t = string.explode(param, ",")t[1] = tonumber(t[1])if getPlayerStorageVocation(cid, storagevip) < os.time() thendoPlayerSendCancel(cid,"Você precisa ser VIP para usar este comando.")elseif(param == '') thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")elseif not(t[1]) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")elseif isInArray(failout, t[1]) thendoPlayerSendCancel(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) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")elselocal tmp = getCreatureOutfit(cid)tmp.lookType = t[1]doCreatureChangeOutfit(cid, tmp)endreturn trueend  

 

AdriezA
17 de abril de 2016 às 00:10

Desktop 17-04-2016 00-09-10-425.png

5712fe81518a3_Desktop17-04-201600-09-10-425.png.6c1a560bee212139bad1f54b315cb0c2.png

DanihcvD
17 de abril de 2016 às 02:33

wtf. Foi meu auto-complete. Malz sahusahusahuas

 

local failout = {73,75,302,266,45,10} -- outfits proibidaslocal storagevip = 85258 --storage da vipfunction onSay(cid, words, param, channel)local t = string.explode(param, ",")t[1] = tonumber(t[1])if getPlayerStorageValue(cid, storagevip) < os.time() thendoPlayerSendCancel(cid,"Você precisa ser VIP para usar este comando.")elseif(param == '') thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")elseif not(t[1]) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")elseif isInArray(failout, t[1]) thendoPlayerSendCancel(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) thendoPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Such outfit does not exist.")elselocal tmp = getCreatureOutfit(cid)tmp.lookType = t[1]doCreatureChangeOutfit(cid, tmp)endreturn trueend  

 

AdriezA
17 de abril de 2016 às 10:47

funfo rep mais

 

DanihcvD
17 de abril de 2016 às 14:13

Tópico movido para dúvidas / pedidos resolvidos.