Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function Rank()
  2. for _,ply in pairs(player.GetAll()) do
  3. if ply:GetNWInt("XP") >= (500*3*(ply:GetNWInt("Level")+1) + ply:GetNWInt("Level")*500) /* and player:GetNWInt("Level") < 150*/ then
  4. ply:SetNWInt("Level", ply:GetNWInt("Level") + 1)
  5. file.Write("gmwar/level/GMWAR_"..ply:UniqueID()..".txt", ply:GetNWInt("Level"))
  6. end
  7. for _,ply in pairs(player.GetAll()) do
  8. if ply:GetNWInt("Level") >= 1 then
  9. ply:SetNWString("Rank", "Private")
  10. if ply:GetNWInt("Level") >= 2 and ply:GetNWString("Rank", "Private") then
  11. ply:SetNWString("Rank", "Corporal")
  12. end
  13. end
  14. end
  15. end
  16. end
  17. hook.Add("Think", "Rank", Rank)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement