CO

[Talkaction] Usar Só Se Tiver Certa Storage

Por CoLoRaDo, 03 de ago. de 2011 em Archived

19
1.9k
CoLoRaDoC
16 de agosto de 2011 às 01:07

Blazingfire nao adianta mesmo sem vip ele me leva pra minha casa mas eu nao vo mais querer este script tem como vc tentar colocar nesse aqui agora?

 

--50% kung lao %50 Vodkart
function onSay(cid, words, param)

local S = { 
       [3] = {price = 1000000,cobrar = true,msg = "Você perdeu seu white skull e frags.", premium = true}, 
       [4] = {price = 3000000,cobrar = true,msg = "Você perdeu seu red skull e frags", premium = true},
       [5] = {price = 5000000,cobrar = true,msg = "Você perdeu seu black skull e frags", premium = true},  
}

local skull = S[getCreatureSkullType(cid)]
if(not skull) then
doPlayerSendCancel(cid,"Você nao está com nenhum tipo de skull.")
return TRUE   
elseif skull.premium == true and not isPremium(cid) then
doPlayerSendCancel(cid,"Apenas players premium podem remover skull.") 
return TRUE
elseif skull.cobrar == true and doPlayerRemoveMoney(cid, skull.price) == FALSE then  
doPlayerSendCancel(cid,"Você não tem " .. skull.price .. " gps para remover sua skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2)
return TRUE
end
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") 
doCreatureSetSkullType(cid, 0)
doRemoveCreature(cid) 
doPlayerSendTextMessage(cid, 22,skull.msg) 
doSendMagicEffect(getPlayerPosition(cid), 26)
return TRUE
end

BlazingfireB
17 de agosto de 2011 às 10:24
--50% kung lao %50 Vodkart
function onSay(cid, words, param)

local S = { 
       [3] = {price = 1000000,cobrar = true,msg = "Você perdeu seu white skull e frags.", premium = true}, 
       [4] = {price = 3000000,cobrar = true,msg = "Você perdeu seu red skull e frags", premium = true},
       [5] = {price = 5000000,cobrar = true,msg = "Você perdeu seu black skull e frags", premium = true},  
}
local storage = 88888 
local skull = S[getCreatureSkullType(cid)]
if(not skull) then
doPlayerSendCancel(cid,"Você nao está com nenhum tipo de skull.")
return TRUE   
elseif skull.premium == true and not isPremium(cid) then
doPlayerSendCancel(cid,"Apenas players premium podem remover skull.") 
return TRUE
elseif skull.cobrar == true and doPlayerRemoveMoney(cid, skull.price) == FALSE then  
doPlayerSendCancel(cid,"Você não tem " .. skull.price .. " gps para remover sua skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2)
return TRUE
elseif getPlayerStorageValue(cid,storage) - os.time() <= 0 then
doPlayerSendCancel(cid,"Você precisa ser vip para remover sua skull.")
end
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") 
doCreatureSetSkullType(cid, 0)
doRemoveCreature(cid) 
doPlayerSendTextMessage(cid, 22,skull.msg) 
doSendMagicEffect(getPlayerPosition(cid), 26)
return TRUE
end

 

Ei, o outro que continua com problema, tente fazer isso:

 

Substitua

 

if (config.vip == "yes") and getPlayerStorageValue(cid,config.storage) - os.time() <= 0 then

 

Por

 

if getPlayerStorageValue(cid,config.storage) - os.time() <= 0 then

Editado Agosto 17 por Blazingfire

CoLoRaDoC
17 de agosto de 2011 às 22:04

eu ja substitui no comando de ir pra house o que tu mando e nao funcionou o comando me leva pra minha casa mesmo eu tando sem vip!

 

e o de tirar pk tambem me tira pk mesmo tando sem vip!

BlazingfireB
18 de agosto de 2011 às 17:30

Caramba..

Agora, se não funcionar é porque o seu vip system é diferente do qual estou pensando, passa o script dele por pm pra eu ver.

Tente esse:

 

--50% kung lao %50 Vodkart
function onSay(cid, words, param)

local S = { 
       [3] = {price = 1000000,cobrar = true,msg = "Você perdeu seu white skull e frags.", premium = true}, 
       [4] = {price = 3000000,cobrar = true,msg = "Você perdeu seu red skull e frags", premium = true},
       [5] = {price = 5000000,cobrar = true,msg = "Você perdeu seu black skull e frags", premium = true},  
}
local storage = 88888 
local skull = S[getCreatureSkullType(cid)]
if(not skull) then
doPlayerSendCancel(cid,"Você nao está com nenhum tipo de skull.")
return TRUE   
elseif skull.premium == true and not isPremium(cid) then
doPlayerSendCancel(cid,"Apenas players premium podem remover skull.") 
return TRUE
elseif skull.cobrar == true and doPlayerRemoveMoney(cid, skull.price) == FALSE then  
doPlayerSendCancel(cid,"Você não tem " .. skull.price .. " gps para remover sua skull.") 
doSendMagicEffect(getPlayerPosition(cid), 2)
return TRUE
elseif getPlayerStorageValue(cid,storage) - os.time() <= 0 then
doPlayerSendCancel(cid,"Você precisa ser vip para remover sua skull.")
return TRUE
end
db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")") 
doCreatureSetSkullType(cid, 0)
doRemoveCreature(cid) 
doPlayerSendTextMessage(cid, 22,skull.msg) 
doSendMagicEffect(getPlayerPosition(cid), 26)
return TRUE
end

Editado Agosto 18 por Blazingfire