English Fast build only for admins

2 replies
Goto Page
To the start Previous 1 Next To the start
07.02.16 07:31:29 pm
Up
boxvers
User
Offline Off
Hi, i need script for my server, fast and unlimited build only for admins (identify by us sgn) but for non admins only unlimited build
07.02.16 07:37:33 pm
Up
Fraizeraust
Moderator
Offline Off
Use this snippet of code below and replace the 5 line with a Fast Build script code from File Archive.
Code:
1
2
3
4
5
6
7
Admins = {}

for _, i in ipairs(Admins) do
     if i == player(id, "usgn") then
          -- Fast Build code here
     end
end

Make sure that it's compatible with this code so you won't get any issue.
07.02.16 08:17:46 pm
Up
Talented Doge
User
Offline Off
I'm feeling generous today because I got my Hetzer on WOT:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("buildattempt", "_build")
admin = {}

function _build(p, t, x, y, m)
     for _, i in ipairs(admin) do
          if player(p, "usgn") == i then
               parse ("spawnobject "..t.." "..x.." "..y.." 0 "..m.." "..player(p, "team").." "..p)
               return 1
          else return 0
          end
     end
end
Talented Doge
To the start Previous 1 Next To the start