Jump to content

question about addcommandhandler


iiv03

Recommended Posts

1 minute ago, WorthlessCynomys said:

lov


local number = 1;

function writeNumber()
  outputChatBox(number);
  number = number + 1;
end
addCommandHandler("number", writeNumber);

 

i wanna do like something start first

local gOutput = false

but i forget...

can u remember it to me? excuse

Link to comment
4 minutes ago, WorthlessCynomys said:

Can you explain it better?

something like this?

local gOutput = false


function project1()
if gOutput == true then
outputChatBox("1")
--elseif outputChatBox == false then
if gOutput == false then
outputChatBox("2")
		end
	end
end
addCommandHandler("code", project1)

it's just random between ("1,2")

Edited by xFabel
Link to comment
1 minute ago, WorthlessCynomys said:

local gOutput = true;

function writeStuff()
  if (gOutput) then
    outputChatBox("1");
  else
    outputChatBox("2");
  end
  gOutput = not gOutput;
end
addCommandHandler("stuff", writeStuff);

 

thx for help :) i forget that's but u remember me

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...