Jump to content

Karuzo

Members
  • Posts

    1,213
  • Joined

  • Last visited

Everything posted by Karuzo

  1. destroyElement(veh)? destroyElement(theVehicle) has to be
  2. huh, that's the default race script interface...
  3. Karuzo

    Question

    why do you want to use gui elements if you could use dx?
  4. Where did you see getPedMoveState was returning a table ?! It returns a string: if state == "sprint" or state == "walk" or state == "powerwalk" then Also, just wanted to say that this script is resolution dependent. 20 pixels won't be the same percentage of the screen height on all resolutions. The high resolution the player will have, the less the rectangle will shake (almost invisible on really high resolution). Same about X+500 and Y+270 Woops, didn't read the wiki carefully. Thank you. To the another problem: How should i solve the resolution prob ?
  5. How are you triggering onGUIPrivateMesage ?
  6. Karuzo

    Questions

    Nah, sorry i don't know such public libraries .
  7. Karuzo

    Questions

    Just use dxDraw There is no other way.
  8. Hey Guys, so i wanted to shake a hud if a player is sprinting/walking than the offset should be +20. but that doesn't work. Hope you can help me. Regards, KRZO. local lplayer = getLocalPlayer() local g_root = getRootElement() local sWidth,sHeight = guiGetScreenSize() local Width,Height = 300,150 local X = (sWidth/2) - (Width/2) local Y = (sHeight/2) - (Height/2) local offset = 0 local turn = true function renderShake() local state = getPedMoveState(lplayer) if state.sprint or state.walk or state.powerwalk then if turn then offset = offset + 1 if offset > 20 then turn = false end else offset = offset - 1 if offset < -20 then turn = true end end else if offset > 0 then offset = offset - 1 elseif offset < 0 then offset = offset + 1 end turn = true end dxDrawRectangle(X+500,(Y+270)-offset,Width,Height,tocolor(44, 62, 80,225),false) end addEventHandler("onClientRender",g_root,renderShake)
  9. Hey Guys, so i was bored and made a simple wallpaper. hope you guys like it http://s7.directupload.net/images/140309/4k6ff43m.png
  10. Just search for car on the community site.
  11. Karuzo

    math.random

    For example , you want to give a random number between lets say 100 and 500 Than you just use math.random(100,500)
  12. Karuzo

    math.random

    Yes, but not only for numbers. You could use variables too.
  13. I think you could use both.
  14. Karuzo

    Question

    Use SQL ALTER TABLE Statement. http://www.techonthenet.com/sql/tables/alter_table.php
  15. huh, not that what i wanted
  16. Hey Citizen, Still have the same problem with the corners.
  17. Karuzo

    Blocking

    Anubhav, please read what he's saying. @Drakath: How bout tables ?
  18. How bout using onClientRender to set the alpha lower ? like local alpha = 255 addEventHandler("onClientRender", root, function() if getDistanceBetweenPoints3D(.....) then alpha = alpha - 10 else alpha = alpha + 10 end if alpha > 255 then alpha = 255 elseif alpha < 150 then alpha = 150 end end)
  19. Like that? dxDrawImageSection( 0, 0, width, height, mapX, mapY, width+100 , height+100 , "map.jpg", rotation, 0, 0, tocolor( 255, 255, 255, 255 ), false ) Now the calculations is wrong
  20. Yeah now it doesn't overlap, thank you very much. But it looks a little bit awkward. How can i make it just to rotate in the square.
  21. How should i clear it ? And wouldn't that lag a little bit ?
×
×
  • Create New...