Jump to content

heroes9898

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by heroes9898

  1. How can I get whether the seat of a vehicle is occupied?
  2. Thx. I tried that already. But the problem is, that the ratio of the resolutions are not same. 800/600 = 1.33.. 1600/900 = 1.77.. I pasted a little sticker on my monitor full bottom of the text. and changed the resolution of the game to 800*600 and sticker was no more under the text.
  3. .:HyPeX:. the scale of the text on the screen is still not same
  4. ok. I'll try it. Looking so that it will work
  5. Hi, my problem is, there is users using 800 * 600 resolution, and users using 1600 * 900 resolution. How should be the algorithm of this scaling? I solved the position problem, but scaling algorithm is too hard example: (I'm creating texts with a MTA using 1600 * 900 resolution) local width, height = guiGetScreenSize() scaleX = width/1600 scaleY = height/900 ... function renderText() dxDrawText("text", 487*scaleX, 244*scaleY, 682*scaleX, 261*scaleY, tocolor(255, 255, 255, 255), 1 * (???), "default") end ??? = ?
  6. i have got guiCreateButton. how can i remove both, the button and eventhandler? (in that function)
  7. i've got the following code: function buttonClicked(button, state) if button == oyuncuYonetimiBtn then --- elseif button == aracYonetimiBtn then --- elseif button == sunucuYonetimiBtn then --- elseif button == sirketYonetimiBtn then --- end end addEventHandler("onClientGUIClick", anyButton, buttonClicked, false) if the function "buttonClicked" called, will be that eventHandler deleted? Or should I remove that eventHandler manually? and how? --and second question: in the function "buttonClicked", should I set the button "anyButton" invisible and set it as nil? do I need it?
  8. yes. the server-side code solved the all problems thanks. -yes I tried everything. even I slap the computer case Serverside coding solved
  9. yess. And I can't see the lights on, when the other player turns that on. Only he can see them.
  10. I made a script containing fuel timer for every vehicle which has its engine on. How would it effect the servers CPU and so on? Would it effect on the responding?
  11. the code is working. On the joining into game, there is no code to change the settings of the vehicle.
  12. i set the vehicles engine state to false (turned off) and turn on the lights. But when I disconnect and connect again to the server, I see that the engine is running and lights are off. Why? and how can I solve it?
  13. thanks. the originalX was an example i asked only whether that works.
  14. I know, is there no way to do something like this?
  15. How can I get a returned value from the triggered client event? Or is there any possibility to do this? example: local x = triggerClientEvent(player, "getPlayerOriginalX", root, ..)
  16. But I need to stop an undefined timer in its function.
  17. Is there any way to stop a timer? something like that? setTimer( function() if getPlayerMoney(client) >= 1200 then --do sth. else --[b][color=#FF0000]break[/color][/b] ? --[b][color=#FF0000]return[/color][/b] ? --[b][color=#FF0000]...[/color][/b] ? end end, 1000, [b][color=#FF0000]0[/color][/b] )
  18. Thanks. I'll try to freeze the vehicle and make it damage-proof
  19. Can I create a vehicle as Object using "createObject"
  20. I found an other solution addEventHandler("onClientVehicleStartEnter", root, function(player,seat,door) setElementFrozen(player, true) setElementFrozen(player, false) end )
  21. here addEventHandler("[color=#FFBF00]onClientVehicleStartEnter[/color]",root, [color=#0080BF]function[/color](player,seat,door) [color=#FF0000]cancelEvent()[/color] [color=#0080BF]end[/color] )
  22. I use "cancelEvent()" in that eventhandler. But it doesn't works. Player enters in the vehicle anyway.
  23. When I call that function, comes the Data/Packet from the server or is it saved in the Memory of the client? An example; my server responds really slowly. And I have an Event on the client: "onClientVehicleStartEnter". I check if the Vehicle has "x" data. Would the player wait until responding from server or responds directly?
×
×
  • Create New...