[Encerrado] ITEM - ACTION VIP

peeuowfe
em Tópicos Sem Resposta

peeuowfe

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 11/10/12Posts: 21

Eu tenho esse action do pokemon, que é a camera que grava para aparecer na TV.

 

function onUse(cid, item, frompos, item2, topos)

if getPlayerStorageValue(cid, 99285) == 2 then
doPlayerSendCancel(cid, "You have to close your private chat to create a TV channel.")
return true
end

if getPlayerStorageValue(cid, 99285) == 1 then
doPlayerSendCancel(cid, "You are already on air! Currently on channel: "..getPlayerStorageValue(cid, 99285).."")
doPlayerSendChannel(cid, getPlayerChannelId(cid), getPlayerStorageValue(cid, 99285))
return true
end

if not isPremium(cid) then
doPlayerSendCancel(cid, "Only premium members are allowed to record videos.")
return true
end

doPlayerPopupFYI(cid, "Choose a channel name")

end

 

Eu queria que ele fosse so pra vip usar, ele so usa se for premium, mais eu queria VIP.

 

Minha VIP que eu uso é essa

 

http://www.xtibia.com/forum/topic/151189-vip-system-by-mock-100/

SkyLigh

User X
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 23/07/12Posts: 2183Char no Tibia: Kissy
function onUse(cid, item, frompos, item2, topos)
local storage = 13540 -- storage da vip
if getPlayerStorageValue(cid, storage) == TRUE then
doPlayerSendCancel(cid, "You no have vip")
return true
end
if getPlayerStorageValue(cid, 99285) == 2 then
doPlayerSendCancel(cid, "You have to close your private chat to create a TV channel.")
return true
end
if getPlayerStorageValue(cid, 99285) == 1 then
doPlayerSendCancel(cid, "You are already on air! Currently on channel: "..getPlayerStorageValue(cid, 99285).."")
doPlayerSendChannel(cid, getPlayerChannelId(cid), getPlayerStorageValue(cid, 99285))
return true
end
doPlayerPopupFYI(cid, "Choose a channel name")
end

Att,
Kissy

peeuowfe

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 11/10/12Posts: 21

function onUse(cid, item, frompos, item2, topos)
local storage = 13540 -- storage da vip
if getPlayerStorageValue(cid, storage) == TRUE then
doPlayerSendCancel(cid, "You no have vip")
return true
end
if getPlayerStorageValue(cid, 99285) == 2 then
doPlayerSendCancel(cid, "You have to close your private chat to create a TV channel.")
return true
end
if getPlayerStorageValue(cid, 99285) == 1 then
doPlayerSendCancel(cid, "You are already on air! Currently on channel: "..getPlayerStorageValue(cid, 99285).."")
doPlayerSendChannel(cid, getPlayerChannelId(cid), getPlayerStorageValue(cid, 99285))
return true
end
doPlayerPopupFYI(cid, "Choose a channel name")
end

 

Nao pego =/, fico pra free

Vodkart

Sumus Validus
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 21/05/10Posts: 3406Gênero: Masculino

troca essa linha:

 

if not isPremium(cid) then

 

por essa

 

if vip.hasVip(cid) == FALSE then

bossisg.png

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

function onUse(cid, item, frompos, item2, topos)
local storage = 13540 -- storage da vip
if getPlayerStorageValue(cid, storage) == TRUE then
doPlayerSendCancel(cid, "You no have vip")
return true
end
if getPlayerStorageValue(cid, 99285) == 2 then
doPlayerSendCancel(cid, "You have to close your private chat to create a TV channel.")
return true
end
if getPlayerStorageValue(cid, 99285) == 1 then
doPlayerSendCancel(cid, "You are already on air! Currently on channel: "..getPlayerStorageValue(cid, 99285).."")
doPlayerSendChannel(cid, getPlayerChannelId(cid), getPlayerStorageValue(cid, 99285))
return true
end
doPlayerPopupFYI(cid, "Choose a channel name")
end

 

mais uma prova q tu n devia ta nesse cargo... ;/

 

pequena aula...

if getPlayerStorageValue(cid, storage) == TRUE then

isso SEMPRE vai dar false, ja q tas comparando um numero com um booleano... ( -1 == true? )

tens q comparar com algum valor pra dai ser true ou false...

if getPlayerStorageValue(cid, storage) == -1 then

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

SkyLigh

User X
avatar
Lorde
Lorde

INFOS

Grupo: LordeRegistrado: 23/07/12Posts: 2183Char no Tibia: Kissy

@Stylo Negativado por flood

Att,
Kissy

StyloMaldoso

a good son makes the house...;p
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 25/01/12Posts: 1593

@Stylo Negativado por flood

creio que esse teu post agora é flood não? não é mais facil da rep - e fica queto kk?

function onUse(cid, item, frompos, item2, topos)
local storage = 13540 -- storage da vip
if getPlayerStorageValue(cid, storage) == TRUE then
doPlayerSendCancel(cid, "You no have vip")
return true
end
if getPlayerStorageValue(cid, 99285) == 2 then
doPlayerSendCancel(cid, "You have to close your private chat to create a TV channel.")
return true
end
if getPlayerStorageValue(cid, 99285) == 1 then
doPlayerSendCancel(cid, "You are already on air! Currently on channel: "..getPlayerStorageValue(cid, 99285).."")
doPlayerSendChannel(cid, getPlayerChannelId(cid), getPlayerStorageValue(cid, 99285))
return true
end
doPlayerPopupFYI(cid, "Choose a channel name")
end

 

mais uma prova q tu n devia ta nesse cargo... ;/

 

pequena aula...

if getPlayerStorageValue(cid, storage) == TRUE then

isso SEMPRE vai dar false, ja q tas comparando um numero com um booleano... ( -1 == true? )

tens q comparar com algum valor pra dai ser true ou false...

if getPlayerStorageValue(cid, storage) == -1 then

poha tbm tinha essa duvida do "==-1", valeu (:

 

 

@alias isso é duvida de servidor derivados,

Project Pokémon Mysterion OpenSoures 2016.

Em breve, mais informações!

 

23vfcht.png

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

@Stylo Negativado por flood

 

unico q devia levar REP- aki eh TU --' isso sim eh um flood sem fla no script todo errado q tu postou ¬¬ abuso de poder eh osso n? ;/

 

@alias isso é duvida de servidor derivados²

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein

 

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel