Call a result from somewhere

Hey I know this title doesn’t say anything yet, but what I want to know is when I register a command, is there a way to call the result like that:

/do this

and somewhere else I could call the answer 'this? if this is possible, it would be great, thanks in advance btw :slight_smile:

Not a modding tutorial. Topic moved. Please be careful of where you post your topics in future, ensure it is in the correct category.


Also, you could do something like result = args[1] then use result elsewhere in your code.

whoops sorry :sweat_smile:
thanks for help :slight_smile:

Well I tried now a few thinks, but nothing does work…
Did you see the thing that needs to be changed in my code? because when I change args to args[1] it wont work.
thanks for help at all :slight_smile:

    RegisterCommand("dosomething", function(source, args, rawCommand)
		local name = "awesomename"
		table.remove(args, 2)
		TriggerClientEvent('chatMessage', -1, name, source, table.concat(args, " "))
		TriggerEvent("tellmeit", name.. " ", args )
	end)

In the last line where args is I changed it so often with different things, but still does not work, hmmm