Forum

> > CS2D > Scripts > GodMode Funcion
Forums overviewCS2D overview Scripts overviewLog in to reply

English GodMode Funcion

12 replies
To the start Previous 1 Next To the start

old GodMode Funcion

Bobakrome
User Off Offline

Quote
Hi there, Can anyone help me? I'm in needing for an Function that activates GodMode...

I try to show :
Pressing F4 Activates GodMode (Can't Be Hurt)
And a text in chat menu appears with : GodMode Activated!
If you cancel it by pressing F4 again : GodMode Deactivated!

Please any help in there?

P.S It to be function like :
function godmode(i)
Or , idk
I'm not good at making function just hooks or ...

old Re: GodMode Funcion

Apache uwu
User Off Offline

Quote
Hmmm

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
godMode={}

addhook("serveraction","_serveraction")
addhook("join","_join")
addhook("hit","_hit")

function _join(id)
	godMode[id]=false
end

function _serveraction(id,action)
	if action==3 then
		if godMode[id]==false then
			msg2(id,"GodMode Activated")
			godMode[id]=true
		else
			msg2(id,"GodMode Deactivated")
			godMode[id]=false
		end
	end
end

function _hit(id)
	if godMode[id]==true then
		return 1
	end
end

Untested, idea is fine.

old Re: GodMode Funcion

Bobakrome
User Off Offline

Quote
Didn't Worked , it just removed my commands from f2 and f3, i want to edit the admin script v3.0 beta and replace the drawmode with godmode? plz help? I credited the owner so no problem , i really didn't credit me..

old Re: GodMode Funcion

Apache uwu
User Off Offline

Quote
Worked for me, make sure you're not running any other scripts. It's not my fault when scripts conflict.

old Re: GodMode Funcion

Bobakrome
User Off Offline

Quote
Anyone can have godmode not just the list
1
godMode={50855}
There was no other Mod on and everyone had GODMODE , madness on my server!!! Everyone have:/

old Re: GodMode Funcion

Jynxxx
User Off Offline

Quote
There that works it has been tested
Spoiler >

old Re: GodMode Funcion

Bobakrome
User Off Offline

Quote
IMG:https://img69.imageshack.us/img69/9886/happytowndaxv0200003.jpg

Devade about the script works for everyone. Also my health was 50 cause after he attacked me i opened the script!
Any help?
edited 1×, last 28.12.11 02:59:46 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview