Hey thanks very useful you think this might work?
addCommandHandler("chilliad", myFunction)
function consoleSetPlayerPosition ( source, chilliad,343,1, 43 )
setElementPosition ( source, 234,1, 4 )
end
addCommandHandler ( "setpos", consoleSetPlayerPosition )
No, it won't work.
1. What is the first line (addCommandHandler) doing there? Nothing, unless you have myFunction somewhere above that you didn't show us here.
2. Making new function's parameters is not passing arguments.
3. NEVER name parameters source even for command handlers. You don't want that, believe me.
Basically, I think you need to get some more basic knowledge... Visit these 2 links:
- https://wiki.multitheftauto.com/index.ph ... troduction
- http://robhol.net/guide/basics
Now is better or still need to fixi t
function consoleSetPlayerPosition ( source, commandName, 232,1, 3 )
setElementPosition ( source, 231, 2, 323 )
end
addCommandHandler ( "stunt", consoleSetPlayerPosition )