
heroes9898
Members-
Posts
29 -
Joined
-
Last visited
Everything posted by heroes9898
-
How can I get whether the seat of a vehicle is occupied?
-
dxDrawText - same text Scale in other resolutions.
heroes9898 replied to heroes9898's topic in Scripting
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. -
dxDrawText - same text Scale in other resolutions.
heroes9898 replied to heroes9898's topic in Scripting
.:HyPeX:. the scale of the text on the screen is still not same -
dxDrawText - same text Scale in other resolutions.
heroes9898 replied to heroes9898's topic in Scripting
ok. I'll try it. Looking so that it will work -
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 ??? = ?
-
OnClientGuiClick - Whats happening after the function runs
heroes9898 replied to heroes9898's topic in Scripting
i have got guiCreateButton. how can i remove both, the button and eventhandler? (in that function) -
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?
-
yes. the server-side code solved the all problems thanks. -yes I tried everything. even I slap the computer case Serverside coding solved
-
yess. And I can't see the lights on, when the other player turns that on. Only he can see them.
-
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?
-
shit
-
the code is working. On the joining into game, there is no code to change the settings of the vehicle.
-
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?
-
thanks. the originalX was an example i asked only whether that works.
-
I know, is there no way to do something like this?
-
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, ..)
-
But I need to stop an undefined timer in its function.
-
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] )
-
Thanks. I'll try to freeze the vehicle and make it damage-proof
-
Can I create a vehicle as Object using "createObject"
-
I found an other solution addEventHandler("onClientVehicleStartEnter", root, function(player,seat,door) setElementFrozen(player, true) setElementFrozen(player, false) end )
-
Thanks for the information.
-
here addEventHandler("[color=#FFBF00]onClientVehicleStartEnter[/color]",root, [color=#0080BF]function[/color](player,seat,door) [color=#FF0000]cancelEvent()[/color] [color=#0080BF]end[/color] )
-
I use "cancelEvent()" in that eventhandler. But it doesn't works. Player enters in the vehicle anyway.
-
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?