Postado Abril 5, 2015 10 anos Se já tiver o comando !vip, posta aí que eu posso te ajudar a fazer o resto. Ajudei? De nada \o/ Att Rusherzin
Postado Abril 5, 2015 10 anos Autor function onSay(cid, words, param) storage = getPlayerStorageValue(cid,11647) if storage == -1 then setPlayerStorageValue(cid,11647,1) addVipDaysByAccount(getPlayerAccountId(cid), 2) doPlayerPopupFYI(cid, "Voce ganhou 2 dias de VIP.") else doPlayerPopupFYI(cid,"Voce ja pegou sua VIP.") end return true end
Postado Abril 5, 2015 10 anos Não testei..Query: ALTER TABLE `accounts` ADD `freevip` TINYINT(1) NOT NULL DEFAULT '0'; Talkaction function onSay(cid, words, param) if getFreeVip(cid) == 0 then db.executeQuery("UPDATE accounts SET freevip="1" WHERE id='" .. getPlayerAccountId(cid) .. "';") addVipDaysByAccount(getPlayerAccountId(cid), 2) doPlayerPopupFYI(cid, "Voce ganhou 2 dias de VIP.") else doPlayerPopupFYI(cid,"Voce ja pegou sua VIP.") end return true end lib/050-function.lua function getFreeVip(cid) return db.getResult("SELECT * FROM accounts WHERE id= '" .. getPlayerAccountId(cid) .. "' LIMIT 1;"):getDataInt("freevip") end Ajudei? De nada \o/ Att Rusherzin
Postado Abril 5, 2015 10 anos Try: function onSay(cid, words, param) if getFreeVip(cid) == 0 then db.executeQuery("UPDATE accounts SET freevip=1 WHERE id='" .. getPlayerAccountId(cid) .. "';") addVipDaysByAccount(getPlayerAccountId(cid), 2) doPlayerPopupFYI(cid, "Voce ganhou 2 dias de VIP.") else doPlayerPopupFYI(cid,"Voce ja pegou sua VIP.") end return true end Ajudei? De nada \o/ Att Rusherzin
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.