The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button (On) (Off)
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#1
Button (On) (Off)

Hi I can't make a simple on off function. I'm only aware how to make an event happen if you press one or several buttons. But idk how to make second event to happen if you press button again and loop it. Also, is there a way to variable it?

PHP Code: (Select All)
void button(string &in asEntity)
{
AddGlobalVarInt("button", +1);
}
else
{
AddGlobalVarInt("button", -1);

I tried this methode with +1 meaning ON and -1 is off. It didn't work at all.
03-06-2018, 07:09 PM
Find


Messages In This Thread
Button (On) (Off) - by User01 - 03-06-2018, 07:09 PM
RE: Button (On) (Off) - by Mudbill - 03-07-2018, 02:46 AM



Users browsing this thread: 1 Guest(s)