bygcrazy Posted September 28, 2009 Posted September 28, 2009 Hey people, How can i make a team select menu like a RPG
Dark Dragon Posted September 28, 2009 Posted September 28, 2009 https://community.multitheftauto.com/index.html?p ... ils&id=141 --create gui elements easily by "drawing" them https://wiki.multitheftauto.com/index.ph ... troduction --to actually make it do something you'll need to script it https://wiki.multitheftauto.com/index.ph ... ng_the_GUI --worth a visit too https://wiki.multitheftauto.com/index.ph ... _functions --gui functions https://wiki.multitheftauto.com/index.ph ... GUI_events --gui events
bygcrazy Posted September 28, 2009 Author Posted September 28, 2009 Hey thanks for the info, Is there anyway that i can make a tteleport like type a command /stunt they can teleport to a place
bygcrazy Posted September 30, 2009 Author Posted September 30, 2009 addCommandHandler + setElementPosition 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 )
50p Posted September 30, 2009 Posted September 30, 2009 addCommandHandler + setElementPosition 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
bygcrazy Posted September 30, 2009 Author Posted September 30, 2009 addCommandHandler + setElementPosition 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 )
subenji99 Posted October 1, 2009 Posted October 1, 2009 You're getting this one for free: after this, you need to learn for yourself. function consoleSetPlayerPosition(player,command,x,y,z) x,y,z = tonumber(x),tonumber(y),tonumber(z) --convert strings to numbers if x and y and z then --if all arguments were valid setElementPosition(player,x,y,z) --move player to provided position else outputChatBox("Error: position invalid. Syntax is '/setpos x y z'",player,255,0,0) --output message on syntax error end end addCommandHandler("setpos",consoleSetPlayerPosition) --command used as "/setpos 1000 2000 30"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now