Jump to content

Gr0x

Members
  • Posts

    109
  • Joined

  • Last visited

Everything posted by Gr0x

  1. Then I don't know what the problem is, it totally worked fine for me. I could hide the markers and blips using runcode These are the commands I used: crun for q,w in pairs(getElementsByType("marker")) do setMarkerSize(w,0) end crun for q,w in pairs(getElementsByType("blip")) do setBlipColor(w,255,255,255,0) end
  2. I'm assuming that's not a client sided script then, is it?
  3. It worked fine for me when I tried, if I understood your question correctly. Could you show me the code you're using?
  4. You should show us "xy.lua", since there is nothing wrong in this code.
  5. You're using setElementVisibleTo, which is server-sided. race_client.lua creates the markers on the client. Try using a client-sided script
  6. I downloaded MTA again a few weeks ago, after not playing it for about 1-2 years. Every time I open it, GTA opens, I can see the GTA San Andreas "splash/title" screen, but right before it would fade away and take me to the main menu, my client crashes without any errors. I can see the cursor changing to the loading one for about half a second, and then there is nothing. mtasa/gtasa/proxysa is not running after that. There is a version that worked however, which was this: mtasa-1.5.4-full_rc-11690-20170927 I have no idea why that particular version works. I've tried other ones, but all of them only works after I install MTA, and click "Run" at the end of the install. If i close the game after that, I can not run it anymore, (except when I use the version i mentioned). But of course it's an older one since 1.5.5 is out, and it autopatches it every time. There are administrator rights for everything, there are no viruses on my computer, and I'm using Windows 10 (64-bit), GTASA works fine w/o MTA. Any ideas? I have been trying to figure it out for days, but for some reason couldn't... I have no idea what could cause this. My friend had the same problem, so I'm pretty sure its a common problem, but I couldnt find any answers. Thanks in advance.
  7. It doesnt. I just tested it myself. Make sure your script is client sided. However, seems like Walid's solution is much better, so you don't need fileExists anyways.
  8. If you check it client-sided, it should return if it exists on the client, not the server.
  9. downloadFile Haven't played MTA for a while, just checked the forums, but I think that might help you.
  10. I just gave you two wiki pages full of examples.
  11. callRemote getElementsByType("player")
  12. local playerVehicle = getPedOccupiedVehicle(localPlayer) if playerVehicle then --code end
  13. You got 2 advices on how to do it. Do it yourself, so you can learn it. If you can't make it, post what you tried, and I'll help you.
  14. function setPlayerDataText(text) if client then local Cuenta = getPlayerAccount (client) setAccountData(Cuenta,"usuarioTexto",tostring(text)) end end addEvent ( "setPlayerDataText", true ) addEventHandler ( "setPlayerDataText", getRootElement(),setPlayerDataText) https://wiki.multitheftauto.com/wiki/Sc ... erverEvent And you also forgot to get the "usuarioTexto" string.
  15. For clicking i guess. For example, onClientGUIClick triggers when you press the left, right, or middle mouse button, and the state will be "down" in this case. If you press the left, obviously button will be equal to "left", if you press right, it will be "right", if you press the middle one (the scrollwheel) it will be "middle". It also triggers, when you release the button, which makes the state variable "up". With this, you will only trigger the event once, and you will only be able to click a button for example with the left click, instead of triggering it twice.
  16. Gr0x

    Problem

    thats a question man!
  17. Server-side: function handleCommand(player) if isPedInVehicle(player) then -- Code. end end addCommandHandler("useme",handleCommand) Client-side: function handleCommand() if isPedInVehicle(localPlayer) then -- Code. end end addCommandHandler("useme",handleCommand)
  18. Gr0x

    Need help

    Not sure what you mean, Either this aclGroupAddObject or this isObjectInACLGroup
  19. Gr0x

    Help

    What is data? Why you use tonumber on 0?
  20. lastTick = 0 function updateFuel() if isPedInVehicle ( localPlayer ) then local veh = getPedOccupiedVehicle( localPlayer ) if getVehicleEngineState ( veh ) == true then CurrentFuelValue = getElementData(veh,"Fuel") if (CurrentFuelValue == 0) then setVehicleEngineState(veh,false) return end if getTickCount() - lastTick <= 10000 then lastTick = getTickCount() setElementData(veh,"Fuel",CurrentFuelValue-1) end end end end addEventHandler ("onClientRender", getLocalPlayer(), updateFuel)
  21. dxDrawImage(px, py, h, h, "img_radar.png", 0, 0, 0, tocolor (math.min(exVHealth,255), math.min(vHealth*3+25,255), 0, 255))
  22. Gr0x

    SQL Login system

    An easy way to achieve what you wanted is this. local HOST = "localhost" local USERNAME = "root" local PASSWORD = "" local DATABASE = "mta" local connection = false function getConnection() return connection end function connect() connection = dbConnect("mysql","dbname="..DATABASE..";host="..HOST..";",USERNAME,PASSWORD) end addEventHandler("onResourceStart",resourceRoot,connect) Just add an export for the getConnection, and change the first line of the other code to local handler = exports.SQL:getConnection()
  23. Gr0x

    getRealTime()

    year = getRealTime().year + 1900 It returns how many years passed since 1900
  24. function getip() outputChatBox("* " ..getPlayerName(source).. " has joined the server", root, 155, 155, 0) for _,thePlayer in pairs(getElementsByType("player")) do if not isGuestAccount(getPlayerAccount(thePlayer)) then if isObjectInACLGroup ("user.".. getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then outputChatBox("** " ..getPlayerName(source).."'s IP:" ..getPlayerIP(source), thePlayer, 0, 255, 0) end end end end addEventHandler("onPlayerLogin", getRootElement(), getip)
×
×
  • Create New...