Jump to content

ImTitanium

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by ImTitanium

  1. They were not working, some did not display the image and some created the image on top of each other everytime I pressed the button
  2. It is working, eveyrthing is fine and i'm using /debugscript 3. I realized the problem is that the image is opening on top of the blip. All I wanted was to make an image and on that image a blip that moves along with the player... The blip is created, it displays on map and on radar, but on the image that I have created it doesn't because the image is on top of the blip.
  3. I did it but it's not working. I have in mind that it's because there is a GUI in front of the blip, as I have said on the first topic message, it's supposed to open an image when the player presses a key and at that image a blip should be displayed, showing player's position, I'll paste the whole script so you can check what I'm doing. It's basically a modified map, an image, when a player moves a blip on that image moves along. myWindow = guiCreateWindow( 100, 0, 600, 600, "asdddasdwds", false ) guiWindowSetSizable( myWindow, false ) guiWindowSetMovable( myWindow, false ) guiSetVisible ( myWindow, false ) myImage = guiCreateStaticImage(9, 18, 581, 572, "radar.png", false, myWindow ) function abriromapa () if ( guiGetVisible ( myWindow ) == false ) then guiSetVisible ( myWindow, true ) else guiSetVisible ( myWindow, false ) end end addCommandHandler( "sadasdddasd", abriromapa ) bindKey( "F11", "down", abriromapa ) function posicao(button,pressOrRelease) if button == "F11" and pressOrRelease then local myPlayer = getLocalPlayer () local myBlip = createBlipAttachedTo ( myPlayer, 2 ) end end addEventHandler("onClientKey", root, posicao)
  4. I'm getting a bad argument on createBlipAttachedTo, I have created a variable to define local player, but I'm pretty sure it's completely wrong... function posicao(button,pressOrRelease) if button == "f11" and pressOrRelease then local myplayer = getLocalPlayer () local myBlip = createBlipAttachedTo ( myPlayer, 2 ) end end addEventHandler("onClientKey", root, posicao)
  5. @SolidSnake, but is the addEventHandler("onClientKey", root, posicao, "F11") Line right? Because it seems like I have made something wrong there. Also, it should only display the button to the player who has pressed the key and it should not display other people locations.
  6. I'm trying to attach a blip to a player's position, so whenever he pressed a key, it should open an image and display a blip on his position on the map, can someone check why have I done wrong? I'm getting the following error message: " Bad argument @ 'attachElements' " It's supposed to attach a blip to a player, and keep changing the blip's location when the player moves, also, it should only display the blip when a key is pressed, which is "F10" function posicao () local myplayer = getLocalPlayer local x, y, z = getElementPosition ( getLocalPlayer ( ) ) local myBlip = createBlip( x, y, z, 2 ) attachElements ( myPlayer, myBlip ) end addEventHandler("onClientKey", root, posicao, "F11")
  7. Sadly, none worked for me, I managed to build it this way: myWindow = guiCreateWindow( 128, 0, 534, 600, "noneedtoknow", false ) guiWindowSetSizable( myWindow, false ) guiWindowSetMovable( myWindow, false ) guiSetVisible ( myWindow, false ) myImage = guiCreateStaticImage(9, 19, 515, 571, "radar.png", false, myWindow ) function abriromapa () if ( guiGetVisible ( myWindow ) == false ) then guiSetVisible ( myWindow, true ) else guiSetVisible ( myWindow, false ) end end addCommandHandler( "noneedtoknoweither", abriromapa ) bindKey( "F10", "down", abriromapa )
  8. This is supposed to open an image when you press F10, but it's not showing anything and I get no error messages on the debug script, can someone check and see what's wrong on this? function mymap () local myWindow = guiCreateWindow ( 20, 200, 100, 100, "Mapa", true ) local mapa = guiCreateStaticImage( 20, 200, 100, 100, "radar.png", false, myWindow ) if ( guiGetVisible ( myWindow ) == true ) then guiSetVisible ( myWindow, false ) else guiSetVisible ( myWindow, true ) end end addCommandHandler( "abrirmapa", mymap ) bindKey( "F10", "down", mymap )
  9. That's the example I was talking about, but the problem is that it's server side and I wanted to build it client side... But anyway, Motion blur is not the effect I wanted, I tested it and it's not good enough, I'll look for something else that looks like what I want... Thanks anyway
  10. Based in an example on the MTA:SA Wiki, I tried to make a client side to change player's blur level through a command, basically it's supposed to change the blur level to a value between 0 - 255 when the player types something like "/blur <0-255>" but the point is that I'm not sure I'm able to build this client side, so can someone tell me if it's possible to build it on the client side and if so what is wrong with my script? function changeBlurLevel ( ) blur = tonumber(blur) if blur < 0 or blur > 255 then outputChatBox ( "Enter a value between 0 - 255.", 255, 0, 0) else setPlayerBlurLevel ( blur ) outputChatBox ( "Blur level set to: " .. blur, 0, 255, 0) end end addCommandHandler("blur", changeBlurLevel)
  11. I have tried it, but it doesn't work.
  12. I can't use "setElementPosition" because it moves the element instantly, and I need the vehicle to move like there is someone piloting it, instead of the element just move instantly.
  13. Basically what I'm trying to do is use something similar to moveObject but instead of an object I'm creating a vehicle, for many reasons it's better for what I'm scripting. The below example works fine, but it's better for me to create a vehicle, it's not needed to post the whole script because I just need a tip on how to move vehicles gradually. local cargueiro = createObject ( 5291, x, y, 80 ) moveObject ( cargueiro, 60000, 2876.24316, -1719.62915, 11.04688) This is how I would like it to be, but there is no such thing as moveVehicle, at least I tried it and it didn't work. The X and Y axis have been defined previously. local cargueiro = createVehicle ( 533, x, y, 80 ) moveVehicle ( cargueiro, 60000, 2876.24316, -1719.62915, 11.04688) Is there something to move the vehicle gradually, or should I just agree with objects?
×
×
  • Create New...