Erknneto

Members
  • Content Count

    45
  • Joined

  • Last visited

Community Reputation

6 Neutral

About Erknneto

  • Rank
    Rat
  • Birthday 29/03/1998

Details

  • Gang
    MTA Evo:Rust
  • Location
    Brazil
  • Occupation
    Scripter
  • Interests
    Women

Recent Profile Visitors

736 profile views
  1. function ... () local username = getPlayerName(source) local qh_account = dbQuery(db, "SELECT * FROM accounts WHERE username=(?) LIMIT 1", username) local result_account = dbPoll(qh_account,-1)[1] if ( result_account ) then local serial = tostring(result_account.serial) local userSerial = getPlayerSerial(source) if ( serial == userSerial ) then outputChatBox("Yes.",source) return else outputChatBox("No.",source) return end end return end The code you're using is kind different from the ones I use about databases, but this might work. You just needed to set the serial from the db as a string and check if it's the same as the one from the player.
  2. Você deve postar na área de português, amigo... lá nós brasileiros podemos te ajudar. Essa aqui é a área exclusiva para dúvidas em inglês. Link: ÁREA DE PORTUGUÊS
  3. Erknneto

    Replace Error

    You're using a non-compatible model for the weapons, try to use another models. It might work.
  4. I think you were setting the wrong element datas, try this code function apagarRadar () setPlayerHudComponentVisible(source,"radar",false) setElementData(source,"showRadar",false) end addEventHandler("onPlayerJoin",getRootElement(),apagarRadar) function mostrarRadar (source) if not ( getElementData(source,"showRadar") ) then setElementData(source,"showRadar",true) setPlayerHudComponentVisible(source,"radar",true) else outputChatBox("Já tens um mapa.",source) end end addCommandHandler("mapa",mostrarRadar)
  5. That code works for all resolutions, just put your resolution there and edit. It will work fine in all resolutions, just edit in your resolution and test in others.
  6. function interiorEnter (element) if ( getElementType(element) == "player" ) then if ( getPlayerMoney(element) >= 100 ) then takePlayerMoney(element,100) setElementPosition(element,834.6,7.4,1004.1) setElementInterior(element,3) else outputChatBox("#ff0000You don't have enough money!",element,255,255,255,true) end end end addEventHandler("onMarkerHit",markerJoin,interiorEnter) Try this, m8.
  7. Well, I always use this code to draw DX stuff, and I recommend you to try it so local sx,sy = guiGetScreenSize() local px,py = 1366,768 --Put your resolution here local x,y = (sx/px),(sy/py) --Example code dxDrawRectangle(x*0, y*0, x*1366, y*80, tocolor(0, 0, 0, 170), false) dxDrawText("Test", x*0, y*0, x*1366, y*80, tocolor(255, 255, 255, 255), 1.5, "pricedown", "center", "center", false, false, false, false, false) It always fits in all resolutions.
  8. You can use the function showCursor. for example: function inventory () showCursor(true,false) --it will show the cursor and the player will still be able to move, etc end bindKey("tab","down",inventory) https://wiki.multitheftauto.com/wiki/ShowCursor
  9. Oh, sorry! You can ignore that, that is an old code from my resources! You can remove that return if you want!
  10. function ejectPlayer (source) if ( isPedInVehicle(source) ) then removePedFromVehicle(source) return end end addCommandHandler("eject",ejectPlayer) Try this code.
  11. Erknneto

    Safezone bug

    You were making some functions not work as they should, and you're not using client-side when you need to be using. This may be working. SERVER SIDE --[[ SERVER SIDE --]] local greenzone = createColRectangle(-2434.68799,-688.11896,150,200) local greenzoneMap = createRadarArea(-2434.68799,-688.11896,150,200,0,255,0,100) function greenzoneEnter (element) if ( getElementType(element) == "player" ) then if not ( getElementData(element,"invincible") ) then setElementData(element,"invincible",true) end outputChatBox("You've entered the greenzone!",element,50,252,3) toggleControl(element,"fire",false) toggleControl(element,"next_weapon",false) toggleControl(element,"previous_weapon",false) toggleControl(element,"aim_weapon",false) toggleControl(element,"vehicle_fire",false) toggleControl(element,"vehicle_secondary_fire",false) setPedWeaponSlot(element,0) end end addEventHandler("onColShapeHit",greenzone,greenzoneEnter) function greenzoneLeave (element) if ( getElementType(element) == "player" ) then if ( getElementData(element,"invincible") ) then setElementData(element,"invincible",false) end outputChatBox("You've left the greenzone!",element,50,252,3) toggleControl(element,"fire",true) toggleControl(element,"next_weapon",true) toggleControl(element,"previous_weapon",true) toggleControl(element,"aim_weapon",true) toggleControl(element,"vehicle_fire",true) toggleControl(element,"vehicle_secondary_fire",true) end end addEventHandler("onColShapeLeave",greenzone,greenzoneEnter) CLIENT SIDE --[[ CLIENT SIDE --]] addEventHandler("onClientPlayerDamage",getLocalPlayer(),function() if ( getElementData(localPlayer,"invincible") ) then cancelEvent() end end) addEventHandler("onClientPlayerStealthKill",getLocalPlayer(),function(target) if ( getElementData(target,"invincible") ) then cancelEvent() end end)
  12. Erknneto

    Admin jetpack

    You know the bind will only be set if the player joins the server, right? Try to reconnect and check if the bind works. Or check the debugscript to see if any errors appears.
  13. Erknneto

    SetTime

    It's not 'setTime', the correct function is setTimer. Read more about it : https://wiki.multitheftauto.com/wiki/SetTimer