MaXwEllDeN

Untitled

Jun 19th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. function addCreature(cid, target, sto)
  2.     local dq = getPlayerStorageValue(cid, sto)
  3.    
  4.     if type(dq) ~= "string" then
  5.         setPlayerStorageValue(cid, sto, tostring(targe))
  6.     else
  7.         setPlayerStorageValue(cid, sto, dq .. ", ".. target)
  8.     end
  9.    
  10.     return true
  11. end
  12.  
  13. function getCreatures(cid, sto)
  14.     local ret = {}
  15.     local dq = getPlayerStorageValue(cid, sto)
  16.    
  17.     if type(dq) == "string" then
  18.         local plays = string.explode(dq, ",")
  19.         for _, v in pairs(plays) do
  20.             table.insert(ret, tonumber(v))
  21.         end
  22.     end
  23.    
  24.     return ret
  25. end
Advertisement
Add Comment
Please, Sign In to add comment