Jump to content

OGF

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by OGF

  1. OGF

    Need help

    put your resource in a .zip file. If you are putting it in a ftp try making the transfer type binary.
  2. OGF

    GUI problem

    Why do you have 3 events for "onClientGUIClick" you can just add one and use elseif statements addEventHandler("onClientGUIClick", guiRoot, functionhere, false)
  3. OGF

    GUI problem

    That's because line 54 is stopping you from pressing your bind. guiSetInputEnabled(true) This should be a better help. guiSetInputMode("no_binds_when_editing")
  4. OGF

    md5

    no that is cracking. However there are websites that can do it because they have the data for that md5, but it don't work for all of them.
  5. OGF

    ban player

    Try this, it should work. Tested. --client function banearButton (text, adminBanner, timeBan, editText) if source == banButton then local timeBan = guiGetText( timeEdit ) local text = guiGridListGetItemText ( listaPlayers, guiGridListGetSelectedItem ( listaPlayers ), 1 ) local editText = guiGetText( reasonEdit ) local adminBanner = getPlayerName( localPlayer ) if string.len ( editText ) > 0 then if string.len ( timeBan ) > 0 then triggerServerEvent("banHim", root, text, adminBanner, timeBan, editText) else outputChatBox("Escribe el tiempo de duracion",255,0,0,false) end else outputChatBox("Escribe la razon para banearlo.",255,0,0,false) end end end addEventHandler("onClientGUIClick", root, banearButton)
  6. Personally I have never used dxDrawLine too much, but That is why for things like this i use guieditor and right click on the lines and use the 'Set Position Code' option and play around from there. Because when you output the code after doing it, you can guarantee it will work on everyone resolution .
  7. Dividing the resolution by 2 so it centers it. so the height of (1920/2 = 960) ( 1080 / 2 = 540 ) which would be in the center of the screen.
  8. That looks really good, but that is the annoying thing DX, you have to play around with it to get it where you want. For example, local screenW, screenH = guiGetScreenSize() --That will create a rectangle and put it in the center of the screen regardless of what resolution you are using. right = dxDrawRectangle((screenW - 488) / 2, (screenH - 24 ) , 488, 24, tocolor(0, 0, 0, 205), true) --This makes a rectangle at the very top of the screen but at the center. another = dxDrawRectangle((screenW - 488) / 2, 0, 488, 24, tocolor(0, 0, 0, 205), true) You just have to play around with it until you get it just right. Since you have different positions for all of them you will have to do it manually kind of like I did it above.
  9. Yeah, working with DX functions is a pain in the ass. But even with DX the code for the link I gave you is similar to centering it, except with out guiGetSize of course.
  10. OGF

    ban player

    There is probably an issue when you send it to the server since it returns false, try posting your code here at least the significant ones.
  11. Have you tried this function? https://wiki.multitheftauto.com/wiki/CenterWindow
  12. OGF

    ban player

    Are you doing something like so .. ? playerToBan = guiGridListGetItemText ( playerlist, guiGridListGetSelectedItem ( playerlist ), 1 ) triggerServerEvent ( "yourEventHere", root, playerToBan )
  13. As far as I know, no there isn't a way. I know what you mean about it being quiet, it can be quite a bother. But as for filling in the lists for new players. function players() guiGridListSetItemText ( playerlist, guiGridListAddRow ( playerlist ), pcolumn, getPlayerName ( source ), false, false ) addEventHandler ( "onClientPlayerJoin", root, players ) Not sure how much you have but remember to take account when a player changes his name to, you'll have to use a for loop for that.
  14. OGF

    Question

    cancelEvent() Only on internal events Here's the link https://wiki.multitheftauto.com/wiki/CancelEvent It tells you everything.
  15. OGF

    help

    I'm not to familiar with the items, but if you want it that way then you have to find the object id of it on map editor and when a player dies set the object on the floor. If you played some dayz or roleplay servers you can see guns can be set on the floor. Experiment with it.
  16. Still not 100% sure what your asking but I assume it might be this. bindKey("F6","down", function() if visible == true then x, y, z = nil, nil, nil progress = 0 setCameraMatrix (117.5101852417, 163.30557250977, 5579.2065429688, 116.48139190674, 156.49519348145, 5579.0087890625) visible = false removeEventHandler("onClientRender",root, aa) else addEventHandler("onClientRender",root, aa) visible = true end end)
  17. You mean return to the initial position of the camera? That is the code I gave you.
  18. OGF

    small question

    He is asking for dxDraw3DImage, not dxDraw3DText or something like that. He said Text also , and I know what he is trying to do. I tried looking for a function like dxDraw3Dimage in the client-sided page, but it was in the useful functions, anyways solidsnakes got it,
  19. Try this. bindKey("F6","down", function() if visible == true then removeEventHandler("onClientRender",root, aa) setCameraMatrix (117.5101852417, 163.30557250977, 5579.2065429688, 116.48139190674, 156.49519348145, 5579.0087890625) visible = false else addEventHandler("onClientRender",root, aa) visible = true end end)
  20. OGF

    small question

    There is a resource for that in the community. You can add your own on the meta.xml. https://community.multitheftauto.com/ind ... ls&id=3090
  21. It's not a forum bug. Whenever you say a swear word that is mta's way of censoring. FUCK YOU BITCH SHIT CUNT --see ?
  22. OGF

    createBlip

    I Just tested the code that I gave you and it does work. what the heck can you possibly do to make it mess up? I don't understand what you are trying to do now..I can't understand you. and your code makes no damn sense, where is thwar , wafaq , police defined? Use my code. function checkTeams() players = getElementsByType ( "player" ) for k, player in ipairs ( players ) do if ( getPlayerTeam ( player ) ) then if getTeamName ( getPlayerTeam( player ) ) == "Thwar" then createBlipAttachedTo( player, 0, 2, 255, 0, 0, 255 ) elseif getTeamName ( getPlayerTeam ( player ) ) == "Police" then createBlipAttachedTo( player, 0, 2, 0, 0, 255, 255 ) elseif getTeamName ( getPlayerTeam ( player ) ) == "Wafaq" then createBlipAttachedTo( player, 0, 2, 0, 255, 0, 255 ) end end end end addEventHandler ( "onResourceStart", resourceRoot, checkTeams )
  23. OGF

    createBlip

    You don't have player or myPlayer defined anywhere as far as this script shows, also you don't need 3 event handlers that are executing similar things that is what elseif statements are for. you don't use createBlip and createBlipAttachedTo. Just use createBlipAttachedTo edit: you know what you got to many fked up things. TRY THIS CODE..not tested. function checkTeams() players = getElementsByType ( "player" ) for k, player in ipairs ( players ) do if ( getPlayerTeam ( player ) ) then if getTeamName ( getPlayerTeam( player ) ) == "Thwar" then createBlipAttachedTo( player, 0, 2, 255, 0, 0, 255 ) elseif getTeamName ( getPlayerTeam ( player ) ) == "Police" then createBlipAttachedTo( player, 0, 2, 0, 0, 255, 255 ) elseif getTeamName ( getPlayerTeam ( player ) ) == "Wafaq" then createBlipAttachedTo( player, 0, 2, 0, 255, 0, 255 ) end end end end addEventHandler ( "onResourceStart", resourceRoot, checkTeams )
  24. Yeah I was testing it, it seems to only work if you are inside a vehicle. Do you know if there is a bug report for it? I saw old ones but not relating to this.
×
×
  • Create New...