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
- Forums
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] ITEM - ACTION VIP
[Encerrado] ITEM - ACTION VIP
By peeuowfe, 01 de mai. de 2013 in Tópicos Sem Resposta
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: 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
Nao pego =/, fico pra free
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

troca essa linha:
if not isPremium(cid) then
por essa
if vip.hasVip(cid) == FALSE then
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: 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
Edited Maio 1 by Slicer
info
Group: Lorde
Joined: 22/07/12
Posts: 2.2k
Reputation: +453
Tibia Character: Kissy

@Stylo Negativado por flood
info
Group: Infante
Joined: 25/01/12
Posts: 1.6k
Reputation: +330

@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 thenisso 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,
Edited Maio 2 by StyloMaldoso
info
Group: Príncipe
Joined: 19/08/10
Posts: 4k
Reputation: +1.1k
Gender: 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²
info
Group: Herói
Joined: 28/11/10
Posts: 3.4k
Reputation: +585
Gender: Masculino

+ 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.





info
Group: Campones
Joined: 11/10/12
Posts: 21
Reputation: 0
Eu tenho esse action do pokemon, que é a camera que grava para aparecer na TV.
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/