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
zee
February 20, 2019, 4:52pm
2
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
thanks for help
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
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