English Spawn on Pos Lua

2 replies
Goto Page
To the start Previous 1 Next To the start
04.08.13 01:36:09 pm
Up
Egoist
User
Offline Off
i want some lua if someone has the right usgn id,to give them an option in F2 to spawn normally,or a pos i set.


F2>Spawn

You will now spawn normally.

You will now spawn on your house.
04.08.13 07:02:46 pm
Up
Rainoth
Moderator
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
tbl = {99999}
isfine = {}

addhook("join","whoiswho")
function whoiswho(id)
     isfine[id]=0
end

addhook("serveraction","makefine")
function makefine(id,b)
     if b == 1 then
          for _,usgn in ipairs(tbl) do
               if player(id,"usgn")==usgn then
                    if isfine[id]==0 then
                         isfine[id]=1
                         msg2(id,"Your text here")
                    elseif isfine[id]==1 then
                         isfine[id]=0
                         msg2(id,"Your text here")
                    end
               end
          end
     end
end

addhook("spawn","magic")
function magic(id)
     if isfine[id]==1 then
          timer(1000,"parse","setpos "..id.." 999 999")
     end
end
11.08.13 06:59:46 pm
Up
Egoist
User
Offline Off
ty it looks fine

p.s:hook names are fantastic
To the start Previous 1 Next To the start