Forum

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

English god mod script request

1 reply
To the start Previous 1 Next To the start

old god mod script request

hunter139
User Off Offline

Quote
hi us
i open this thread to request a god mod script

i searched for other threads in the forum and i found 3
1. empty
2. good, not what i reaaly wanted, didnt work
3. no commands

i searched for uploads in file archive and found 1
1. not what i really wanted

these are my requests
• Only selected usgn users can use the command of godmod
1
adminlist = {}

• command !god to enable god
1
msg2(id,"@000255000GodMod Is Now Enabled")
• command !nogod to disable god
1
msg2(id,"@255000000GodMod Is Now Disabled")

• other players cant see the "!god" and "!nogod" chat message

• the admin can give god mod to other players
1
2
3
4
5
!god <ID>
msg2(id,"@000255000The Admin/Owner Gave You God Ability")
-------------------------------------
!nogod <ID>
msg2(id,"@255000000Sorry, The Admim/Owner Decided To Remove Your God Ability")
• the admin can give god to all
1
2
3
4
5
!god-all
msg2("@000255000You Can't Die Or Kill Someone, The Players Are Peacefull")
-------------------
!nogod-all
msg2("@255000000Watch Out, Anyone Can Kill You Now")
• the admin can give god for specefic minutes
1
2
3
4
!god <ID> <TIME IN MINUTES>
msg2(id,"@000255000The Admin/Owner Gave You God Ability For "..minutes.." minutes")
else
msg2(id,"@255000000Sorry, You Time As God Has Been Expired")

Hope someone can do it

old Re: god mod script request

MikuAuahDark
User Off Offline

Quote
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
god={}
adminlist={}
for i=1,32 do god[i]=false end

function isAdmin(i)
	for n,v in pairs(adminlist) do
		if v==player(i,"usgn") then
			return true
		end
	end
	return false
end

addhook("say","MikuAuahDark",50)
function MikuAuahDark(id,txt)
	if txt:sub(1,1)=="!" then
		if isAdmin(id) then
			local split={}
			for w in txt:gmatch"%S+" do table.insert(split,tonumber(w) or w) end
			if split[1]=="!god" then
				god[split[2]]=true
				if split[3]~=nil then
					god[split[2]]=timerEx(1000*split[3],loadstring("god["..split[2].."]=0 msg2("..splt[2]..",\"\169255000000Your godmode is expired!\")"),1)
				else
					god[split[2]]=-1
				end
				msg2(split[2],"\169000255000Admin give you godmode!")
			elseif split[1]=="!nogod" then
				if god[split[2]]~=0 then
					if god[split[2]]>0 then freetimerEx(god[split[2]]) end
					god[split[2]]=0
					msg2(split[2],"\169255000000Admiin remove your godmode")
				end
			end
			return 1
		end
	end
end

addhook("hit","GelapAh",50)
function GelapAh(id)
	if god[id]~=0 then return 1 end
end

addhook("join","Auah")
function Auah(id)
	if god[id]~=0 then
		if god[id]>0 then freetimerEx(god[id]) end
		god[id]=0
	end
end
Just edit some code yourself
You also need file cs2d Timer Extra function(timerEx) v4.0 to make it working
Untested
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview