daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local vocs = {
  2.     [12] = 4,
  3.     [11] = 3,
  4.     [10] = 2,
  5.     [9] = 1,
  6. }
  7.  
  8. function CheckREMOVERVIP(cid)
  9.  
  10.     local ostime = getPlayerStorageValue(cid, 29000)
  11.     if (ostime > 0) then
  12.         if (os.time() >= ostime) then
  13.             if (vocs[getPlayerVocation(cid)]) then
  14.                 doPlayerSetVocation(cid, vocs[getPlayerVocation(cid)])
  15.             end
  16.             db.executeQuery("DELETE FROM `player_storage` WHERE `player_id` = ".. getPlayerAccount(cid) .." AND `key` = 29000;")
  17.             doPlayerSendTextMessage(cid, 27, "Seus dias de VIP acabaram.")
  18.             doPlayerSetVocation(cid, vocs[getPlayerVocation(cid)])
  19.             doPlayerSetGroupId(cid, 1)
  20.         else
  21.             if (os.time() > 1) and (not vocs[getPlayerVocation(cid)]) then
  22.                 for i, v in pairs(vocs) do
  23.                     if (v == getPlayerVocation(cid)) then
  24.                         doPlayerSetVocation(cid, i)
  25.                         break
  26.                     end
  27.                 end
  28.             end
  29.                 registerCreatureEvent(cid, "VipCheckL")
  30.         end
  31.  
  32.     end
  33. end
  34.  
  35. function onLogin(cid)
  36.     setPlayerStorageValue(cid, 29000, 1)
  37.     CheckREMOVERVIP(cid)
  38.     return true
  39. end
  40.  
  41. function onLogout(cid)
  42.     CheckREMOVERVIP(cid)
  43.     return true
  44. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top