Jump to content

R1ddl3

Members
  • Posts

    5
  • Joined

  • Last visited

R1ddl3's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Ok, solved. Maybe it is stupid what I did. I added such line in mtaserver.conf: <resource src="hydra_script" startup="1" protected="0" /> Now it works. Maybe I am a person who didn't read all tutorials, sorry. But without this line server-side script was working and I was expecting client-side should also work. Anywany thanks for help!
  2. Oh maybe something wrong outside the code. I run mta server, I join my local server and only server side script works. I will try to find a solution. Will post if I find.
  3. I am new in MTA scripting. Created first resource. It's meta: <meta> <script src="vehicle.lua" type="server"/> <script src="myClient.lua" type="client"/> </meta> Vehicle.lua is working, it's content: 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) myClient.lua is not working at all, content: function escapeMe ( commandName ) local x, y, z = getElementPosition ( localPlayer ) --Get player's position setElementPosition ( localPlayer, x+(math.random(-10,10)), y+(math.random(-10,10)), z+(math.random(1,15)) ) --Move a player randomly to a nearby location. X is current x + a number between -10, 10 and so on. end addCommandHandler ( "escape", escapeMe ) --When player types "/escape" in chatbox or "escape" in console I took this code from example from here https://wiki.multitheftauto.com/wiki/AddCommandHandler I have completely no idea why client side script is not working at all. I tried different this and nothing works. MTASA v1.5.9 server
  4. R1ddl3

    JAVA SDK

    This SDK only works as a server side or also client side? I guess the first one. I would really appreciate coding MTA in some new language like Java/Kotlin/C#.
  5. Hello all, I was never scripting in MTA, but did in SA:MP many years ago. I saw in YouTube video some guy flying Hydra and changing Hydra flying mode instantly. Not sure it was a mode or MTA feature. Is there a function in MTA to do this?
×
×
  • Create New...