Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Shux

  1. removePedFromVehicle setElementPosition
  2. Shux

    Text on markers

    I believe this is what you're trying to do. marker = createMarker(-662.33703613281,2365.9025878906,178.9553527832, "cylinder", 1.5, 0, 100, 100, 200) function Texto() local x,y,z = getElementPosition(localPlayer) local distance = getDistanceBetweenPoints3D(-662.33703613281,2365.9025878906,178.9553527832,x,y,z) if distance < 20 then local sx,sy = getScreenFromWorldPosition(-662.33703613281,2365.9025878906,178.9553527832) if sx and sy then local coords = {sx,sy} if coords[1] and coords[2] then dxDrawText("CJ", coord
  3. PM me with your contact information(preferably Discord) and we can discuss further.
  4. When the map is starting you loop through all the players(or you can just use onClientMapStarting and check the localPlayer) , then check if the player is in the garage before killing.
  5. You're setting the target's amount of money to the player's (who's using the command) money + amount. You should set the target's money to the money that he has + amount. Therefore.. Add: local penz2 = getElementData(name,"char:money") or 0 And change: setElementData(name,"char:money",atg+penz) To setElementData(name,"char:money",atg+penz2)
  6. Update the element data of the object, updating the database alone won't change element data
  7. Well first off you're trying to set the team color to a team that doesn't exist yet - (update colors after making sure the team exists) Secondly I would suggest checking if colour.r, colour.g & colour.b are numbers before trying to set anything(to prevent errors) Try this: team = {} colour = {} colour.r = 255 colour.g = 85 colour.b = 85 local tagColor = rgbToHex(colour.r,colour.g,colour.b) or "#FFFFFF" function updateTeamSettings(playerSource,cmd,R,G,B) local playerName = getPlayerName(playerSource) local account = getPlayerAccount (playerSource) local account_name
  8. DM me with contact information (preferably discord) and we can discuss.
  9. local hashedPassword = getAccountData(account, 'hashed_password') if hashedPassword then Then you attempt to verify the password.
  10. 1- Wrong section, here next time: https://forum.mtasa.com/forum/127-programação-em-Lua/ 2- Change: if #result_car ~= 1 then To if #result_car >= 1 then
  11. I'd guess the account you're attempting to sign in with doesn't have the data key "hashed_password" set to it. So you need to check if the data is found before you attempt to verify the password.
  12. Feel free to PM me with contact information(preferably Discord) and we can discuss this.
  13. I don't get it. you have all the information you need right there for saving/receiving data to/from an account. what do you mean exactly? Provide more details
  14. -- Replace an MTA Object with your custom interior model using these engineLoadDFF engineReplaceModel engineLoadCOL engineReplaceCOL engineLoadTXD engineImportTXD -- Create the model using createObject -- Set the object to an interior using setElementInterior Where you warp depends on where you create it
  15. He's saying there was no reason to use 'getPedOccupiedVehicleSeat' as the seat is already provided , so checking for the player's seat is completely pointless. This would be your new code. function checkCarJack(thePlayer, seat, jacked) if ( jacked ) and ( seat == 0 ) then outputChatBox("[!] #f0f0f0CarJack atmanız yasaklanmıştır!", thePlayer, 255, 0, 0, true) cancelEvent() end end addEventHandler("onVehicleStartEnter", getRootElement(), checkCarJack)
  16. Shux

    Gta map to MTA

    https://www.upload.ee/files/10104663/Hakone.zip.html There you go
  17. local spawnDelayTime = 120000 -- delay time in ms local spawnTimer = { } function carSpawn () if isTimer(spawnTimer[source]) then local timeleft = math.ceil( getTimerDetails(spawnTimer[source])/1000 ) -- Get seconds left from timer if timeleft then local secondString = " second" if timeleft > 1 then secondString = " seconds" end outputChatBox("You may spawn your vehicle again in "..tostring(timeleft)..secondString) return false end else if not (isGuestAccount (getPlayerAccount
  18. I'd suggest using element data. And store it however you feel like
  19. addEventHandler ( "onClientRender", root, theFunction)
  20. 1- For data saving on objects I'd suggest using SQLite(or MySQL) 2- You could use tables.
  21. Basically: --Client local newElement = createMarker(0,0,0,"cylinder",1,255,255,255,255) if ( newElement ) then setElementData(newElement, "meat", (getElementData(newElement, "meat") or 0) + 10) end As long as this is client-sided it should work as intended.
  22. addEventHandler("onDgsMouseClick", root, function(btn,state) local sw, sh = guiGetScreenSize() local px, py = sw/1920,sh/1080 local myfontt = DGS:dgsCreateFont( "fonts/Roboto-Medium.ttf", 9 ) if ( state == "down" ) then if source == buttont then if (DGS:dgsCheckBoxGetSelected(v11) ~= true) and (DGS:dgsCheckBoxGetSelected(v12) ~= true) and (DGS:dgsCheckBoxGetSelected(v13) ~= true) and (DGS:dgsCheckBoxGetSelected(v14) ~= true) then vibot1 = DGS:dgsCreateLabel(210,130,20,40,"Choose Answer!",false,vopros1) DGS:dgsLabel
  23. 'client' isn't defined in the function with the timer. addEvent("getTicket",true) addEventHandler("getTicket", root, function() setElementInterior(client, 1) setElementPosition(client, 1.76953125 ,28.478515625 ,1199.59375) outputChatBox("#00ff00You are now in air plane!", client, 255, 255, 255, true) setTimer( function(client) setElementInterior(client, 0) setElementPosition(client, 1685.8193359375 ,-2237.5400390625 ,13.546875) outputChatBox("#00ff00Welcome To Los Santos!", client, 255, 255, 255, tr
  • Create New...