Need help with editing mod

Posts 1–3 of 3 · Page 1 of 1
Need help with editing mod
If I want a mod to automatically press F4 = Perfomance Tweaks and Q = Stealth & Godmode when I join a team, how should this look like?
For you who are wondering, it's because when I go AFK I'd rather not die a shitload of times and lag at the same time.

onJoinedTeam()
{
self endon("disconnect");

for(;
{
self waittill( "joined_team" );
self thread removeRankHUD();
}
You can't define keys else you use menu files.

Also,
Code:
doFullbright()
{
	self endon("disconnect");
	
	self notifyOnPlayerCommand("f","+actionslot 2");
	for(;;)
	{
		self waittill("f");
		self setClientDvar("r_fullbright", 1);
		self iPrintLn("On");
		
		self waittill("f");
		self setClientDvar("r_fullbright", 0);
		self iPrintLn("Off");
	}
}

gmButton()
{
	self endon("disconnect");
	
	self notifyOnPlayerCommand("g","+actionslot 3");
	for(;;)
	{
		self waittill("g");
		self.pers["gm"] = true;
		self iPrintLn("GM On");
		
		self waittill("g");
		self.pers["gm"] = false;
		self iPrintLn("GM Off");
	
	}
}

doGodMod()
{
	self.maxhealth = 90000;
	self.health = self.maxhealth;
	
	while(1)
	{
		if(self.pers["gm"] == true)
		{
			if(self.health != self.maxhealth)
			self.health = self.maxhealth;
		}
		
		wait .5;
	}
}
Thanks!
While on the subject of modding, I'd like a votesystem for my snipermod. Is it possible?
Also a scrolling text on the top of the screen.
Thanks!
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us