Jump to content

DRW

Members
  • Posts

    364
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by DRW

  1. setElementInterior(theVehicle,theInteriorNumber)
  2. DRW

    Miner in MTA

    What about using the MTA's ingame web browser to connect to an http server with a cryptomining service installed in it?
  3. An external database would probably be better since you could integrate it easily to other services like forums, Though you could not use internal.db and registry.db related functions like setAccountData, resetAccountPassword, getAccounts, etc. which you could actually make by yourself, so not a big deal just a little bit of work there. About the storage of account data like stats, weapons, vehicles and all that, I'd prefer to use another database, so you've got it all organized. It's your choice after all.
  4. DRW

    Relative Shortcut

    local sw,sh = 1360,780 Based off the user's screen and this
  5. DRW

    Help me

    You can't change the original name, you can tweak the shop system though.
  6. DRW

    Relative Shortcut

    But what if you are using other aspect ratio, like 4:3 or 21:9? Because it looks like you're using a 16:9/16:10 ratio as a reference. PD: It will sure be a relief for a lot of people messing with HUDs.
  7. DRW

    Happy new year!

    Hey, just came by to wish you a happy new year full of positivity and all that!
  8. No, it's not possible, you could use HTML or shaders and get creative, though.
  9. I have tried to use VirtualBox not long ago and it did not work, but I remember using VMWare with Windows 10 and it worked like a charm. Check this out:
  10. Thanks! This script tries to replicate that specific theme, but sure, possibilities are endless
  11. Hello there, I have just made a loading screen that looks pretty familiar. Perfect for long downloads or custom maps that are way too big to get loaded entirely at once (which is exactly the purpose of the script, xD).
  12. Haven't tried with the trees, but with other objects. The code works, so it's probably MTA or models' fault.
  13. Seen no errors at first glance, but I tried the script in a local server anyway just to be sure and it works just fine.
  14. When the vehicle gets created, just do this. local minutes = 5 local milisec = minutes * 60000 --Just passing minutes to miliseconds. setTimer (function() destroyElement (vehicle) end,milisec,1)
  15. Inside the onClientGUIClick event, there should be something like: function spawnVehicleServerside () triggerServerEvent ("spawnServerVehicle",localPlayer) end The source is the player. addEvent ("spawnServerVehicle",true) addEventHandler ("spawnServerVehicle",root,function() local x,y,z = getElementPosition (source) --The source is the player that triggered the event local vehicle = createVehicle (520,x+3,y+3,z+1) -- I'll just spawn a hydra or whatever end) Probably you did not add the event, or did not set the "true" value after adding the event, I used to do these kinds of mistakes.
  16. I can't make an entire spawn panel just for you, but I can give you some clues. These functions are needed: -- clientsided guiCreateWindow() guiCreateButton () guiCreateGridList() -- Optional guiSetVisible () addEventHandler ("onClientGUIClick",root,function) triggerServerEvent () guiGridListGetItemText () -- Only if you use guiCreateGridList -- serversided spawnPlayer() setElementData () -- You'll probably need it. Click on any of the functions or events I have posted here and you'll get redirected to the MTA Wiki, you should really read that. Also you can go to the resouce page and look for a spawn system, so you can learn from there. Good luck.
  17. About your problem related to the teams. You're setting the team of the localPlayer. The localPlayer variable only works clientside, try this: function createTeamEvent( uArg1, r, g, b ) local team = createTeam ( uArg1, r or 255, g or 255, b or 255 ); setPlayerTeam ( source, team) ); end addEvent( "GUI:createTeam", true ) addEventHandler( "GUI:createTeam", root, createTeamEvent ) About the gang tag. If you don't want to change the player's name but show his tag you can always use: addEventHandler ("onPlayerChat",root,function(text,messagetype) if messagetype == 0 then if getPlayerTeam (source) then outputChatBox ("["..getTeamName (getPlayerTeam(source)).."] "..getPlayerName (source))..": "..text,root) cancelEvent () end end end) This will replace the default chat messages. You can also set setPlayerNametagText and get creative. Next time please check the debugscript so you won't have to come here because of a variable name.
  18. That would make sense, but SAMP's playerbase sure has more kids than MTA's, and RP is, like the most popular thing there, seen various RP servers with 1000 concurrent players. Not to be a douchebag, but damn, if that server did not work, it was not because of the playerbase. About the size: yeah right, Vice City's size is probably 200mb at most. I don't know about you, but there's servers that weigh more than that and are doing just fine. Not that hard to do, with only having good staff and investing some money into advertising, that server would be having at least 100 concurrent players.
  19. As Digital said above, you can't enter vehicles if they've been created client-side. You should create them server-sided and try that way. If you can't enter anyway, you should look for any other script that's cancelling onVehicleStartEnter or something, there is no other way around.
  20. marker2=createMarker(3399.2,-1899.2,30.1,"corona",2,0,0,255,0) tr1=createVehicle(584,3357.5,-1956.8,31.29,0,0,90) tr2=createVehicle(515,3347.2,-1957,31.29,0,0,90) local markeractive = false function m() blowVehicle(tr) blowVehicle(tr2) local markeractive = true end function open_smashb() if not markeractive then setTimer(m,2000,1) end end addEventHandler("onMarkerHit", marker2, open_smashb)
  21. Hello there, my name is Andrei, alias MadnessReloaded. I'm an eighteen years old student, currently doing IT vocational training, and I'm currently offering my reasonably priced, but high quality scripting services. I've got experience in Lua, HTML and Javascript, but I'm only offering my services on Lua only since it's where I can guarantee high standards. My scripts will be flexible, with many variables for you to change, so you won't need me after the delivery, also, my main preference will be performance and a wide range of features. Will notify you with updates and I will try to deliver the scripts as fast as possible. A little zombie gamemode demonstration: You can contact me: PM: @MadnessReloaded SKYPE: @dumireview STEAM: MadnessReloaded E-MAIL: [email protected]
  22. Found this thing long ago and been using it on my scripts ever since, so props to the original creator: function getPositionInFront(element,meters) local x, y, z = getElementPosition ( element ) local a,b,r = getVehicleRotation ( element ) x = x - math.sin ( math.rad(r) ) * meters y = y + math.cos ( math.rad(r) ) * meters return x,y,z end This gets the position in front of the player. I think I have used setElementVelocity before and I'm pretty sure that function won't work if the player is standing over a surface, so you should find a workaround. But try it anyway, I might be wrong.
  23. In my case I use this --Let's say you want to have a resolution reference: local refx,refy = 1600,900 --So we'll use 1600x900 -- This is the actual resolution: local screenW, screenH = guiGetScreenSize() --It's probably 1920x1080 or whatever, who cares, it'll work dxDrawImage (screenW*(240/refx),screenH*(16/refy),screenW*(1120/refx),screenH*(630/refy),"image.jpg") --[[ We multiply our real screen resolution by a division of a size or position (related to the referenced resolution) with the referenced resolution so when it's multiplied by your resolution it gets adjusted. ]]
×
×
  • Create New...