English hats and save points error

2 replies
Goto Page
To the start Previous 1 Next To the start
10.10.17 03:15:39 am
Up
Hi us guys,

I'm in need of your help, I have an error with these codes, someone who can help me with these mistakes?, I can not find the error.

Hats code error >

Save points error >


IMG:https://i62.servimg.com/u/f62/19/44/27/27/bandic10.jpg


I need to correct these codes, thanks to all
10.10.17 06:17:09 pm
Up
Bowlinghead
User
Offline Off
Do you understand the problem?
I guess this fixes it:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("join","loaddata")
function loaddata(id)
     local loaded = false
     if player(id,"usgn") > 0 then
          local f = io.open("sys/lua/hats tiky/saves/"..player(id,"usgn")..".txt","r")
          if f ~= nil then
               for line in f:lines() do
                    currenthat[id] = tonumber(line)
                    break
               end
               loaded = true
               f:close()
          else 
          -- create new file
          end
     end
     if not loaded then
          currenthat[id] = 0
     end
end
Share time limited free games here
11.10.17 01:44:21 am
Up
something can be done for when the command is used Restart Round? because when the round is reset the hats go out.
To the start Previous 1 Next To the start