03-06-2018, 07:09 PM
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?
I tried this methode with +1 meaning ON and -1 is off. It didn't work at all.
PHP Code:
void button(string &in asEntity)
{
AddGlobalVarInt("button", +1);
}
else
{
AddGlobalVarInt("button", -1);
}