-
Posts
1,255 -
Joined
-
Last visited
Everything posted by .:HyPeX:.
-
"3" is being the DATA itself there. Not the key. if the random player data you get is 3 then there's your problem.
-
Hello, is there any client-sided variant of isElementVisibleTo? i'd like to use a client-sided check for a nametags script. Greetz HyPeX
-
What would you define by random player stats? You're btw not using any value obtained from SQL onto the player, or at least not correctly: if driftbest then setElementData(source, "Last Drift", driftlast) setElementData(source, "Total Drift", drifttotal) setElementData(source, "Best Drift", driftbest) outputChatBox("Drift Data Loaded.", source) elseif driftbest == "0" or driftbest == 0 then setElementData(source, "Last Drift", 3) setElementData(source, "Total Drift", 3) setElementData(source, "Best Drift", 3) elseif driftbest == nil then setElementData(source, "Last Drift", 3) setElementData(source, "Total Drift", 3) setElementData(source, "Best Drift", 3) end This doesnt make much sence, since it will be either the first one (it exists) or the last one (It doesnt. Aka. nil) So if it doesnt exists, then it will be "3". This would be your "random player"?
-
[quote name=..&G:..]Are you exporting the function using "exports"? If so, have you added the export name in the resource's meta? All what i'm doing is inside the Race, and even more, the errors spammed are from the race_client itself (Within the same file).
-
You're using the player name as DB variable, wich is really crazy actually (Anyone before with the same name could've done the drifts). Use the serial and check again.
-
Hello guys, i've got an issue, apparently the race_client is trying to call 'table.create' from utils_client and the function appears to not be loaded (Even thought the race meta specifys that race_client is loaded after) Only change i did to the race (Before it was working perfectly) was adding some extra things to the race_client, wich do not interfer with the race itself, but still are a lot of lines. (I dont belive a bigger file will cause issues, but who knows if it is?) I tried making it start on resource start instead of direct code, but another error appears and the countdown never starts. (I'm set as not ready) addEventHandler('onClientResourceStart',resourceRoot,function() g_ArmedVehicleIDs = table.create({ 425, 447, 520, 430, 464, 432 }, true) g_WaterCraftIDs = table.create({ 539, 460, 417, 447, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 }, true) end) The errors are: - Start spamming error "isPlayerRaceDead (a nil value)" <- The function IS there... - Then spams the previous error + "isPlayerFinished (a nil value)" <- Function exists aswell... Greetz
-
Please remember animations (If they're smooth) can always exceed the == parameter, (1.009 instead of 1), use >= and <= instead. For example: local start = getTickCount() function call() local now = getTickCount() local progress = (now-start)/1000 if progress >= 1 then -- Progress of exact values can often be overriden removeEventHandler('onClientRender',root,call) end end addEventHandler('onClientRender',root,call) Else, i cant find any other problem in this code, if my posted solution doesnt work, post the rest of the code wich involves this (Mainly the variables wich you're using and what this affects)
-
What i was asking was if it was ideal in performance terms, i could add a check to see if the text changes and then do the size update, my question was if it was worth the work. (But i guess not so much since its client side stuff)
-
Make the text always fit in a 100 pixel width space, having the size 1 as maximum and getting smaller if it is too big. I'm not sure how the math wouldbe, but you could use a while loop, something like this: local text = "~HyPeX~ASdasdasd" local size = dxGetTextWidth(text,1,"default") local tSize = 1; if ( size < 100 ) then while ( size < 100 ) do tSize = tSize + 0.5; size = dxGetTextWidth(text,tSize,"default") end elseif ( size > 100 ) then while ( size > 100 ) then tSize = tSize - 0.5; size = dxGetTextWidth(text,tSize,"default") end end outputConsole ( tSize ); Would that work in a clientRender loop, or is it adviced to do it before?
-
Hello, i've got a question, how can i invert my text size? To clarify these are my maths: local text = "~HyPeX~ASdasdasd" local size = dxGetTextWidth(text,1,"default") local max = 100 local size = size/max local tsize = size * -4+4 outputConsole(tsize) So far, it works kinda good, but the sizes vary too much. I.e: big texts are excesively small and small texts are excesively big..
-
A "fake signal" is not possible as the GUI window is created by MTA. Oh. Great then
-
But isnt the script wich answers this request? (I.e, a scripted fake signal couldnt do it?)
-
Yeah, but isnt the whitelist dependant on the script itself downloaded from the server? the server can still whitelist whatever it wants and send it to clients
-
What about letting the client have a setting wich can be turned off only from the MTA Settings wich limits the pages to only load the whitelisted ones? - So clients can at their own risk disable this safety measure.
-
Wouldnt in the case of Youtube a key injection do the trick?
-
Make a resource to execute the function on resource start and make the server start the resource when it starts
-
Seems good! thanks.
-
how do i check their extension? Split by the . and then check for the rest? (Or find by .mp3?)
-
Idk if you know, but there is a map editor....
-
Hello, so far i tried some nasty things but with no succeed... My first guess was something like this: local _,_,rot = getElementRotation(veh2) local size = getElementRadius ( veh2 ) local x,y,z = getElementPosition(veh2) local nx,ny = getPointFromDistanceRotation(x,y,size*0.7,rot) local cx,cy,cz = getPositionFromElementOffset(veh2, nx,ny,z+size) This wasnt even close to work at all actually... My second guess i thought it was closer (But actually just trying to get something to work at all), but it is somehow not working... local x,y,z = getElementPosition(veh1) dxDrawRectangle3D( x, y,z+10,10, 10,tocolor(255,255,255,255)) Any help regarding to this would be appreciated. My idea was to make the box appear just on top of the car as a podium, wich i couldnt achieve at all right now... Visual failure:
-
Hello everyone, so far i'm trying to understand a bit things on how to customly load resources. My question so far is how to retrive the .mp3 files loaded in the meta. XML Atributes maybe, but how? Thanks HyPeX
-
Just read all the arguments of dxDrawText, check the colorcode argument.
-
It does the same job thought, but it is not retriving the ID...
