
DjSt3rios
Members-
Posts
113 -
Joined
-
Last visited
Everything posted by DjSt3rios
-
I will give it a try, Thank you.. I will reply in a few minutes.
-
Thanks JR10, but how should i make it? like instead of math.floor use this function?
-
Actually i tried this right now, looks ok its just some times from 90 it goes to 79, which i dont really like, but it seems i dont have any other choice
-
Hello... I have a weird problem. I made a button to increase the volume of a sound, and show on the screen the percentage of the sound volume... i made it volume*100, and it starts with 100%, i press - button to decrease volume and its going 90%. then i press again - to go 80% but it appears this: 79.9999923 and some other numbers, instead of 80%... here is my code for increase/decrease volume: function increasevolume() setSoundVolume(song, getSoundVolume(song) + 0.10) killTimer(hidetimer) killTimer(hidetimer2) showmessage = 1 hidetimer2 = setTimer(hidemessage, 5000, 1) end function decreasevolume() setSoundVolume(song, getSoundVolume(song) - 0.10) showmessage = 1 killTimer(hidetimer) killTimer(hidetimer2) hidetimer = setTimer(hidemessage, 5000, 1) end function hidemessage() showmessage = 0 end and onClientRender i use this code: volume = getSoundVolume(song) dxDrawText("Volume: " .. tonumber(volume*100) .. "%", x1,y1-10,x2,y2, tocolor(255,0,0), 1.5, "pricedown","center","top", false,true,false) if someone has any idea, please tell me. thanks. EDIT: I made a command with outputChatBox to show the exact number of getSoundVolume... so i found that that with setSoundVolume(song, vol + 0.1, it doesnt really increase it by exactly 0.1... maybe any idea to fix this?
-
oh yeh, i didnt actually thought about it, lol. PS: I suck at maths. Thank you very much!
-
Hello, I would like to ask something. I want to show in the screen the volume of a song... so I want to show it as percentage, so i probably need to make the number float to show it like 0.90 = 90%, but im not sure how to make getSoundVolume show it as float.. can someone help me? thanks.
-
Im sorry, but its not working... I thought it would work as i used this function before, and was working fine.... i dont know, i tried many ways to fix it but nothing.. maybe any idea? EDIT: I made it work in Client-Side... Now i will try to fix it completely, thanks anyway
-
Thank you very much! EDIT: Actually its not working.. although i believed it would work.. maybe some help? I did it server-side...
-
Hmm, Could you help me make it with a For so it can be applied to all players? for is pretty weird in lua
-
Hello, I was wondering if it is possible to disable the chat. I Tested Server Side onPlayerChat to use cancelEvent() but no luck. On client side, when i type, San andreas crashes... maybe there is another way to do it?
-
Hello guys, I need some help. First i wanted to ask If there is any way we can find errors on client scripting.. Well here is my problem. I Made a map for race game mode, with a client script which has 900 lines ( well you will say wow, wtf... ) but yes I made a lot of scripting, I worked like 10 days on it. Anyway, In my server was working fine, but when i uploaded it on my server, we were 32 players online, and the map wasnt working properly.. i had a music script, and I couldnt close it... But this music script was used in all my maps, and my previous maps were fine... and I had some images on the screen, and sometime they dissapear, and in after like 15 secs the images come back again... I dont understand whats wrong.. Maybe any idea what can cause this? Thanks.
-
I doubt that it will work, but still the car will stop with this way
-
Hmm, thats what i tried buddy anyway, i think i will make it, thanks anyway
-
Hello, I Need some help, Although im not sure if it can be fixed, but Here the problem: There is a downhill road in my map, and i made a code which rotates the car all the time plveh = getPedOccupiedVehicle(getLocalPlayer()) if plveh and getVehicleName(plveh) == "Infernus" then rx1,ry1,rz1 = getVehicleRotation(plveh) setVehicleRotation(plveh, rx1, ry1, rz1+20) end So, it sets the rotation +20 normally, But because its downhill, it crashes some time with the road, I dont know if you get it.. In a straight road works fine, but here is downhill.. so could we fix it somehow? thanks.
-
Sorry for bumping this kinda "old" post, but i got problem again.. > This doesnt work.. maybe another way i could make it? Just for 1 map.. thanks
-
I found that the mp3 was the problem. Although i changed mp3, and i did /redo, still was the same. But when i quitted from the server and rejoined, it was fixed.Although the mp3 which had the problem, was playing fine in Windows Media Player, but for some reason in MTA had problem. Anyway its all fixed now, thanks anyway!
-
Well, im not that stupid, I tried it, I didnt use triggerEvent and all this in the beginning, but its not working.. in the beginning i used only playSound("sounds/turbo..mp3") But no luck..
-
Hello, Im trying to make a code, when the car changes gear, play a small turbo sound, to sound more cool. The problem is, i hear a small sound, like it begins, but it stops immediately, i can only listen a small sound for like 100MS and it stops.. I dont really understand why.. maybe someone can help me? Codes I have so far: in meta.xml: "sounds/turbo.mp3" /> I have a folder named sounds and the file inside. local function begin() setRadioChannel(0) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), begin ) gRootElement = getRootElement() gThisResourceName = getResourceName(getThisResource()) addEvent("soundTurbo", true) addEventHandler("soundTurbo", gRootElement, function() setRadioChannel(0) song = playSound("sounds/turbo.mp3", false) setSoundVolume(song,1) setSoundPaused(song, false) end) local function soundturbo() triggerEvent("soundTurbo", getLocalPlayer()) end addCommandHandler("turbo", soundturbo) Actually, This one is made with command, not when car is changing gear, but its the same. So, I type /turbo, and i have the problem I said before. If someone has any idea what can cause this problem, please let me know. Thank you!
-
hmm.. im trying, actually now i got a problem with a text mostly... I made it like that: local screenWidth, screenHeight = guiGetScreenSize() local x1,y1,x2,y2 = screenWidth*0.0,screenHeight*0.88,screenWidth*0.8,screenHeight*0.8 But it appears in the middle and a lil bit left. But i want to make it More to left, and i have to make it like: local x1,y1,x2,y2 = screenWidth*0.0-700 The thing is if i put -700 it wont work properly with other resolution
-
How should i find the pixels the image looks on my resolution or do u mean to resize it as its big?
-
I tried that, but the image becomes too big.. any other idea?
-
Hello, I have a problem.. I have 1440 x 900 resolution, and i made an image appear down-left on the screen... but a friend has 1024 x 768 resolutios and he cant see it. Can i make somehow read the resolution and if its lower, draw the image higher? thanks.
-
hmmm.. im not really that good to make it maybe you could help me?
-
Hello, I was wondering if its possible to change vehicle engine sound... Or disable it and make it with custom sound, using pitch, if RPM are increasing, increase the pitch, something like that.. could this be possible? thanks
-
I will test it soon.. but why it wont be next map? Isnt this supposed to set next map? --> executeCommandHandler("nextmap", user, map) ?