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
On, Off Button
User01 Offline
Member

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

I need a little help. When I push the button, the lamp gets on. But when I push it again it will just stay on, insteadt off. What do I need to add/change?

PHP Code: (Select All)
void OnStart()
{
SetLocalVarInt("Var1"0);
SetEntityPlayerInteractCallback("button1""func1"false);
}


void func1(string &in asEntity)
{
AddLocalVarInt("Var1"1);
    
SetLampLit("bonfire1"truetrue);
    
PlaySoundAtEntity("""spot.snt""bonfire1"0.5ffalse);

(This post was last modified: 03-23-2013, 02:07 AM by plutomaniac.)
03-02-2013, 03:57 AM
Find


Messages In This Thread
On, Off Button - by User01 - 03-02-2013, 03:57 AM
RE: On, Off Button - by No Author - 03-02-2013, 04:43 AM
RE: On, Off Button - by User01 - 03-02-2013, 04:50 AM
RE: On, Off Button - by No Author - 03-02-2013, 04:54 AM



Users browsing this thread: 1 Guest(s)