AnonGaming

Untitled

Nov 5th, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1.  
  2. function sql_value_stats ( ply )
  3.    
  4.     local playerStats = sql.QueryValue("SELECT * FROM player_info WHERE unique_id = '"..ply:steamID().."'")
  5.    
  6.     local unique_id = tonumber(playerStats["unique_id"])
  7.     local money = tonumber(playerStats["money"])
  8.     local level = tonumber(playerStats["level"])
  9.     local zombieexp = tonumber(playerStats["zombieexp"])
  10.     ply:SetNWString("unique_id", unique_id)
  11.     ply:SetNWInt("money", money)
  12.     ply:SetNWInt("zombieexp", zombieexp)
  13.     ply:SetNWInt("level", level)
  14. end
  15.  
  16. function sql_value_skills ( ply )
  17.  
  18.     local playerSkills = sql.QueryValue("SELECT * FROM player_skills WHERE unique_id = '"..ply:steamID().."'")
  19.  
  20.  
  21.     local unique_id = tonumber(playerSkills["unique_id"])
  22.     local speech = tonumber(playerSkills["speech"])
  23.     local fish = tonumber(playerSkills["fish"])
  24.     local farm = tonumber(playerSkills["farm"])
  25.    
  26.     ply:SetNWString("unique_id", unique_id)
  27.     ply:SetNWInt("speech", speech)
  28.     ply:SetNWInt("fish", fish)
  29.     ply:SetNWInt("farm", farm)
  30. end
Add Comment
Please, Sign In to add comment