Forum

> > CS2D > Scripts > god mode script
Forums overviewCS2D overview Scripts overviewLog in to reply

English god mode script

9 replies
To the start Previous 1 Next To the start

old god mode script

Ahmad
User Off Offline

Quote
hi guys

can someone gave me godmod script for admin

i want just godmod not the whole admin script

old Re: god mode script

Bowlinghead
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
usgn = {} -- Your USGN ID!

addhook("hit","lol")
function lol(id)
	for _, usgn in ipairs(usgn) do
		if player(id,"ugsn")==usgn then
			return 1
		end
	end
end

old Re: god mode script

Bowlinghead
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
usgn = {} -- Your USGN ID!

addhook("hit","lol")
function lol(id)
	for _, usgn in ipairs(usgn) do
		if player(id,"usgn")==usgn then
			return 1
		end
	end
end

Now?

old Re: god mode script

Bowlinghead
User Off Offline

Quote
Yeah.
So much you want!

Just make a "," between them

example:

1,12,123,1234,12345,123456,1234567,12345678,123456789

old Re: god mode script

DannyDeth
User Off Offline

Quote
@user Bowlinghead:
Are you mal?
1
usgn = {}
And then
1
for _,usgn in ipairs(usgn) do
WTF? Are you crazy? That will allow for a single user only!! Change:
1
2
3
4
5
6
7
8
9
10
usgn = {} -- Your USGN ID!

addhook("hit","lol")
function lol(id)
     for _, u in pairs(usgn) do
          if player(id,"usgn")==u then
               return 1
          end
     end
end
And never use ipairs. Only pairs, it's faster.

old Re: god mode script

EngiN33R
Moderator Off Offline

Quote
The usage of pairs really won't make a difference in speed in this case. I mean there will be hardly 5 values there, it doesn't matter what to use. Plus, saying 'never use ipairs' is stupid - sometimes you just need to use ipairs.

old Re: god mode script

Ahmad
User Off Offline

Quote
MC_Bowlinghead's script worked fine btw
there is 3 players have godmod
i didnt try the other one yet
whats the different ? less lag?
edited 1×, last 16.12.11 08:12:27 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview