rocky168 Posted September 8, 2012 Share Posted September 8, 2012 Hi guys i downloaded MTA:SA yesterday and enjoyed playing alot! I am trying to setup a server, i have experience coding in sa-mp, vc-mp, lu and little apps and websites (many languages) so all i need to know is where to start and a place where i can get a good gamemode to start. thank you Link to comment
Jaysds1 Posted September 8, 2012 Share Posted September 8, 2012 ok, welcome to MTASA and to start off, the play resource is started first, so that's a GameMode, next is you start off from here: wiki.multitheftauto.com Link to comment
Anderl Posted September 8, 2012 Share Posted September 8, 2012 ok, welcome to MTASAand to start off, the play resource is started first, so that's a GameMode, next is you start off from here: wiki.multitheftauto.com You're wrong. He should start learning Lua first: http://lua.org http://lua-users.org Link to comment
rocky168 Posted September 9, 2012 Author Share Posted September 9, 2012 Thanks guys , found this on wiki :- function createVehicleForPlayer(thePlayer, command, vehicleModel) local x,y,z = getElementPosition(thePlayer) -- get the position of the player x = x + 5 -- add 5 units to the x position local createdVehicle = createVehicle(tonumber(vehicleModel),x,y,z) -- check if the return value was ''false'' if (createdVehicle == false) then -- if so, output a message to the chatbox, but only to this player. outputChatBox("Failed to create vehicle.",thePlayer) end end addCommandHandler("createvehicle", createVehicleForPlayer) Don't it require the vehiclemodel in addCommandHandler since createvehicleforplayer function has it? Link to comment
Jaysds1 Posted September 9, 2012 Share Posted September 9, 2012 no, there's only 2 addCommandHandler vars, one is for the command name and the other is for the function name, so what ever the player types in after the command name is a var meaning it's the vehicleModel. Example: addCommandHandler("hey",function(source,_,sentence) outputChatBox(getPlayerName(source).." said Hey, "..sentence) end) /hey wats up MTA Community? Jaysds1 said Hey, wats up MTA Community? Link to comment
rocky168 Posted September 9, 2012 Author Share Posted September 9, 2012 no, there's only 2 addCommandHandler vars, one is for the command name and the other is for the function name, so what ever the player types in after the command name is a var meaning it's the vehicleModel. Example: addCommandHandler("hey",function(source,_,sentence) outputChatBox(getPlayerName(source).." said Hey, "..sentence) end) /hey wats up MTA Community? Jaysds1 said Hey, wats up MTA Community? If the player didn't input the vehiclemodel then it will return outputChatBox("Failed to create vehicle.",thePlayer) right? Link to comment
rocky168 Posted September 10, 2012 Author Share Posted September 10, 2012 Thanks for your help guys , can you suggest me a good base mode to start for my gamemode I am not looking for the ones the servers are running like race, zombie, RPG. Thank you Link to comment
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