Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. nah, you just add it to the "resources" folder, then start it in console or server.
  2. Ok, NOW WHAT YOU GUYS HAVE ALL BEEN WAITING FOR!!! JWorld137 Online GUI-Editor: http://apps.jworld137.com/mtagui.php Please don't forget to donate on our site! Thanks
  3. Ok, I have an idea for that, thanks
  4. try these: https://wiki.multitheftauto.com/wiki/Se ... forwarding https://forum.multitheftauto.com/viewtop ... 26#p352164
  5. And you could check out this: https://forum.multitheftauto.com/viewtop ... 9e#p435293
  6. lol, ya UPDATE: I've added a progress list at the top of this topic.
  7. Try searching for it: https://www.google.ca/search?q=Qt+to+Lu ... =Qt+to+Lua
  8. Best way to start: https://forum.multitheftauto.com/viewtop ... a48715ef9b
  9. Thanks, and I've posted some more in my earlier post
  10. ok, Screenshots at the top: https://forum.multitheftauto.com/viewtop ... 88#p540514
  11. Lol, ok, I'll post some later on today.
  12. Here: https://wiki.multitheftauto.com/wiki/Ca ... ds_Example The top shows an example.
  13. Web GUI-Editor I guess you're wondering what I mean by "Online GUI-Editor", and if I am right, you really think I meant a website GUI-Editor... Well, of course I meant a website gui-editor and if you thought I meant something else then gtfo NOW, I'm joking. Ok, so I'm currently working on an "Online GUI-Editor" on a GitHub repository and I'm really trying to finish it before 2017. I want you to check out how it's looking so far so that I could know if there's bugs and/or problems with it. The whole project is being built based on R3mp GUI Editor resource (this). Project: https://github.com/Jaysds1/MTA-Web-GUI-Editor Project Website: https://jaysds1.github.io/MTA-Web-GUI-Editor/ R3mp GUI-Editor Resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=141 Thanks all.
  14. if you want to let them either have 1 or 2 just use math.random here: local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(0,2)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end )
  15. Use these: guiCreateStaticImage --use this to create the image getElementHealth --use this to get the players health guiSetVisible --use this to set the image visible or not Example: local image = guiCreateStaticImage(0,0,300,100,"image.png",false) --create image before the script continues guiSetVisible(image,false) --hide the image before anyone sees it addEventHandler("onClientPlayerDamage",root,function() --triggers when the localPlayer gets damaged if getElementHealth(source)<=10 then --check if his health is 10 or less guiSetVisible(image,true) --set the hurt image visible elseif guiGetVisible(image) then --if the localPlayer health isn't 10 or less then check if the hurt image is still visible guiSetVisible(image,false) --set the hurt image not visible end end) Sorry for that little error, I've been scripting in JS lately.
  16. he added it but you need to change this: setElementInterior(player, id) --change id with the wanted interior id
  17. ok, try this, Server: addCommandHandler ( "a",function() local ped = createPed(0, 138.70454406738, 2491.1267089844, 16.484375) local pVeh = createVehicle(411, -73.699996948242, 2506.3999023438, 16.299999237061,0,0,270) warpPedIntoVehicle ( ped,pVeh ,0 ) triggerClientEvent("onCameraStart",root, ped,pVeh) outputChatBox("test") end) Client: local peds = {} function camera() for ped,veh in ipairs(peds)do local x, y, z = getElementPosition(veh) setCameraMatrix(x+5, y+12, z+4, x, y, z) end end function cameraStarts(ped,pVeh) setPedControlState(ped,"accelerate",true) if not peds[ped] then peds[ped] = pVeh end addEventHandler("onClientPreRender",root,camera) --triggerServerEvent("onTestYou",root) end addEvent( "onCameraStart", true ) addEventHandler( "onCameraStart",root, cameraStarts )
  18. So you want to create a ped using the command then set it driving, and you want to watch it drive. Am I right?
  19. If the MySQL server wasn't running, then the connection would fail and it would've output that the server could not be reached. Anyways, It looks like your MySQL server is running on your computer because 127.0.0.1 is localhost. try this: outputChatBox("halloWelt") rpg_db = dbConnect("mysql","dbname=mta_rpg;host=**","***","****") -- **=host/ip ***=uname ****=password if not rpg_db then outputConsole ("failed") return --stops the script from continuing end outputChatBox("loaded") dbQuery(function(q) res = dbPoll(q,-1) --Got this from the wiki for you for result, row in pairs ( result ) do -- by using a second loop (use it if you want to get the values of all columns the query selected): for column, value in pairs ( row ) do -- column = the mysql column of the table in the query -- value = the value of that column in this certain row end -- or without a second loop (use it if you want to handle every value in a special way): outputChatBox ( row["column"] ) -- it will output the value of the column "column" in this certain row end end,rpg_db,"SELECT fname FROM acc") outputChatBox("mysqlQery")
×
×
  • Create New...