[Solved]need some help here !!

Posts 1–3 of 3 · Page 1 of 1
[Solved]need some help here !!
Hello.I have one script ..and i when i press button for chatmodeteam or chatmodepublic..i want my script stop working.How do i do that ??It should be like this ?
if(self press button "chatmodepublic or chatmodeteam")
{
wait 1;
}
else
{
my code here
}
What do you want exactly ? Something like chatspamming ? Or a function that gives you God mode (For example) and stop the gm when you press the button ?
Code:
monitorKeys()
{
        self.pressedChat = false;
	self endon("disconnect");
	self endon("death");
        self notifyOnPlayerCommand("chatPublic", "chatmodepublic");
	self notifyOnPlayerCommand("chatTeam", "chatmodeteam");
	for(;;) 
	{
		self waittill_any("chatPublic", "chatTeam");
		self.pressedChat = true;
	        self waittill_any("chatPublic", "chatTeam");
                self.pressedChat = false; 
	}
}

yourCode()
{
	if(self.pressedChat)
	{
		wait 1;
	}
	else
	{
		//your code here
	}
}
Add:
self thread monitorKeys();
to onPlayerSpawned.

/marked as solved
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Need help?