-
Posts
6,089 -
Joined
-
Last visited
-
Days Won
216
Everything posted by IIYAMA
-
?font = dxCreateFont(":race/addons/font.ttf",math.max(12*(x/1280), 8)) You can set an under limit. Custom fonts on low resolutions are indeed an problem. I also haven't solved that problem yet.
-
You can do that by comparing the current position with the new position. If the current position is 90 and you are moving to 90, you should do nothing. If the current position is -90 and you are moving to -90, you should do nothing. If the current position is -45 and you are moving to -90, then you should execute the timer not 90 times, but only 45 times. end,100,90) Calculated to: end,100,45) This is just doing the math, like you do on school. I prefer onClientPreRender/onClientRender and getTickCount() for this kind of scripts, but I guess that is too complex for starters.
-
if ry < 0 then ry = 360 + ry end Try this. It will make sure that the rotation is positive and yet you can give it negative values. (use it directly after you updated the variable ry) EDITED
-
setTimer(function () ------------------- -- place it here -- ------------------- -------------------- -- and remove: +1 -- setVehicleComponentRotation(vehicle, "gearflapleft", rx, ry --[[ +1]], rz) -------------------- ----------------- -- debug it!!! -- iprint("Debugging the variable ry:", ry) ----------------- end,100,90)
-
I am not sure about that at the moment, since you didn't even read it. A little shame on you. If you did read that topic, you would have known that waiting for warnings/errors will get you nowhere. (there is more to debugging) You can update the ry variable like this: (make sure you put it inside the function which is called by the timer) ry = ry + 1
-
There is no tool that does what you want afaik. But there is a tool that can help you identify the texture names: shader_tex_names Which you can use in scripts like this: Shader { pass P0 { Texture[0] = gTexture; } } Script addEventHandler( "onClientResourceStart", resourceRoot, function () local textureReplacementsTable = { {"bullethitsmoke", "dds" , "dxt5"}, {"collisionsmoke", "dds" , "dxt5"}, {"bloodpool_64", "dds" , "dxt5"} } for i=1,#textureReplacementsTable do local textureData = textureReplacementsTable[i] local texShader = dxCreateShader ( "shaders/texreplace.fx" ) if texShader then dxSetShaderValue(texShader,"gTexture",dxCreateTexture("textures/" .. textureData[1] .. "." .. textureData[2], textureData[3])) engineApplyShaderToWorldTexture(texShader, textureData[1]) end end end)
-
Might be also possible. But even if that is correct, not updating the ry variable will end up with the same result. ry = ry +1
-
Update the variable: ry @Noah_Antilles follow this tutorial, because saying that something doesn't work, doesn't help fixing it at all.
-
call(getResourceFromName("[DWN]Core"), "showErrorCode", player, "02) Try to use call instead. The exports function does not always work correctly, I haven't figured out the reason of that. Btw it is not recommended to use special characters in your resources names. [DWN]Core Those brackets are used to make folders invisible for the server. [invisible]
-
and the meta of the resource you are calling? (since you have to enable export functions there)
-
It doesn't say that. If you want to log that, you will need to create a script for that. local function announceUnban( theBan, responsibleElement ) if getElementType( responsibleElement ) then --Check if a player unbanned the IP/Serial outputServerLog( getPlayerName( responsibleElement ) .. " unbanned " .. ( getBanSerial(theBan) or getBanIP(theBan) ) ) --Output to the chatbox saying the player has unbanned the IP/Serial else outputServerLog("Resource unbanned: " .. ( getBanSerial(theBan) or getBanIP(theBan) ) ) --Output to the chatbox saying the player has unbanned the IP/Serial end end addEventHandler( "onUnban", root, announceUnban ) --Adds the event handler for 'onUnban' But there is way to check that without the script. It will not always be 100% accurate. You will have to scroll up to the places where the players have been banned. Open: server\mods\deathmatch\banlist.xml Check which ones have been removed. With that information you can pinpoint which admins might have removed that ban.
-
then you should be able to split the file, but indeed strange. Probably because the process took to long to execute and got killed.
-
what did you saved in it? You might want to consider splitting it up in multiple files even if it is a large table.
-
server\mods\deathmatch\logs\server.log There you will find things like this: (ban) [2017-04-29 15:54:14] ADMIN: XXXX has banned XXXXX [2017-04-29 15:54:14] BAN: Serial ban was added by Anonymous admin And things like this: (unban) [2017-04-29 15:59:56] UNBAN: A ban was removed by XXXXXX
-
Did you really ban yourself? You are fantastic! https://wiki.multitheftauto.com/wiki/RemoveBan
-
Create the outlines of the ring in Photoshop, that solved the problem for me. See pm.
-
function firstShow() local progress = ( ( getTickCount() - counter ) / 5000 ) local progress2 = ( ( getTickCount() - counter ) / 2000 ) :Oanim1 = interpolateBetween(1800, 0, 0, 1545, 0, 0, progress2, "Linear" ) alpha = interpolateBetween(alpha, 0, 0, 255, 0, 0, progress, "Linear") dxDrawImage(:Oanim1, 35, 50, 50, ":not/img/circle.png", 0, 0, 0, tocolor(255, 255, 255, alpha), true) if progress >= 0.40 then addEventHandler("onClientRender", root, secondShow) end end addEventHandler("onClientRender", root, firstShow) Warnings and errors do have influence on the smooth fps. Even if your fps is 60 or even 100... It could also be the images. If those are very large or unoptimised. (I do not know the file size, so I can't judge that) ":not/img/extend.png" ":not/img/circle.png" You can optimised them with .dds files. https://en.wikipedia.org/wiki/DirectDraw_Surface Tool to convert images in to .dds files: nightly.multitheftauto.com/files/shaders/DxTex.zip (not recommended for very large images and must be a power of two)
-
dxDrawImage3D( x - 0.5, y - 1.25, z_ground, 1, 2.5, imagen, tocolor( 0, 255, 230, 255 ), 0, x, y, z +1 ) █XSIZE / 2 = █XOFFSET █YSIZE / 2 = █YOFFSET -- I am HERE on the LEFT / TOP-- -----\--/----- ------\/------ --LEFT / TOP-------------------- -------------------------------- -------------------------------- -------------------------------- ----------------RIGHT / BOTTOM-- LEFT / TOP = player position The size will be added in to the direction of the RIGHT / BOTTOM corner. SIZE > + \/ + Subtract 50% of the X Size and Y Size of the LEFT / TOP, will adjust the image position so that the image middle position is at the player position. --LEFT / TOP-------------------- -------------------------------- -------I WANT TO BE HERE-------- -------------------------------- ----------------RIGHT / BOTTOM--
- 14 replies
-
- dxdrawimage3d
- centerimage3d
- (and 6 more)
-
@Lalalu I know you didn't want to say that, because that would be very inhuman, but I just informed you what kind of effect it would have when a scripter says that to a scripter. You do not want people to get angry right? Then take my advice. Another thing, this is the scripting section. If you post code here, everybody would expect you to be a scripter. If you aren't a scripter, then make sure to write that down at the start of the topic. If you do not write that down, people would expect you to be capable of solve small adjustments like this. So make sure that the helpers are aware of your limitations. If I knew that you were not a scripter, I wouldn't have pointed out that this matter in the first place. I hope this information will help you in the future. Is the image position correct now? If not, be specific and show results(screenshots + code for example).
- 14 replies
-
- 1
-
-
- dxdrawimage3d
- centerimage3d
- (and 6 more)
-
? dxDrawImage3D( x-0.5, y-1.25, z_ground, 1, 2.5, imagen, tocolor( 0, 255, 230, 255 ), 0, x, y, z +1 ) Using not a square image is a terrible mistake, but try this. And would you please stop that. Saying that is means the same as: 'I am too lazy to follow instructions and I will be waiting for somebody else to do it for me' You don't want to say that to people that are trying to help you.
- 14 replies
-
- 1
-
-
- dxdrawimage3d
- centerimage3d
- (and 6 more)
-
function zombset (player) -- this is clientside, not serverside! Use localPlayer instead of player. (you should be able to see a warning, if you do not use it.) local _, _, myrot = getElementRotation(localPlayer)
- 5 replies
-
- scripting question
- looking for zombie script
-
(and 1 more)
Tagged with:
-
(NOT little) * source code = update!
-
I am eating popcorn for real, but it has nothing more to add except for turning clientside in to a hungry pac(kets)-man.
-
Just send the account count to clientside. There are 11k accounts, eat my 11k popcorn. (1 trigger) The clientside can request: I want the account information of the accounts: 50 t/m 300 (1 trigger) The server will send back: (250 x account information in 1 TABLE and in 1 TRIGGER). It can't be more efficient... except for using the latent trigger variant.