-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
How about a feature to stop and start/restart a resource which contains this console message? I personally hate to stop a resource using adminpanel, when it simple can be done with 1 click. > Normally you have to open adminpanel(go to the resource tab), search first for the resource and click on stop, start or restart. Imagine you have only two buttons, one that restarts/starts the resource and one to stop it.
-
https://wiki.multitheftauto.com/wiki/LoadMapData https://wiki.multitheftauto.com/wiki/SaveMapData
-
Before you are going to clip it, it might be handy to check if the rectangle is actually inside the map: local areaXRightSide = areaX+areaWidth local areaYBottom = areaY+areaHeight local BigmapRightSide = Bigmap.PosX+Bigmap.Width local BigmapBottom = Bigmap.PosY+Bigmap.Height if ((areaXRightSide > Bigmap.PosX) and (areaX < BigmapRightSide)) and ((areaYBottom > Bigmap.PosY) and (areaY < BigmapBottom)) then Untested. local areaX2, areaY2 = math.min(areaX, Bigmap.PosX), math.min(areaY, Bigmap.PosY) local areaWidth2, areaHeight2 = areaWidth, areaHeight if areaX2 ~= areaX then areaWidth2 = areaWidth-(areaX-areaX2) end if areaY2 ~= areaY then areaHeight2 = areaHeight-(areaY-areaY2) end -- You can script the bottom clip!!!! dxDrawRectangle(areaX2, areaY2, areaWidth2, areaHeight2, tocolor(areaR, areaG, areaB, areaA), false); Untested And you can script the bottom clip! end
-
Debug console Easier debugging your code? Then this debug resource might be something for you. Screenshot of 1.0.2 Video of 1.0.2 Features, improvements and bug fixes: Stop and start/restart resources with errors/warnings Minimize window Download reduction (debug information) Stops the data transfer when reaching the maximal amount of transfers Custom ID system, which will give more options for other features. Move the window Saving the planet! Scale the window Fixed bug: not showing the cursor when the window is not active Zero state Saving window position and scale A small useful backup after restarting the resource. (50 items remain available for 1 min, after stopping the resource) Serverside: collecting errors and warnings from both sides, so you can also check errors/warnings from other players.(95%) + ugly GUI (Serverside: collecting errors and warnings from both sides) database? Direct line edit based on the error. Exporting to the File editor resource from Gothem. (He doesn't reply any more...) Credits for the testers. Opening debug automatic for developers. (serial or cookie or both?) ■ Finished ■ Working on ■ Waiting... * Requires the right: ModifyOtherObjects - For the functions: fileOpen, fileRead, fileClose To solve this problem, add the resource in your admin group. Controls: - Z > Showing the cursor - Left shift + Z > Showing the cursor(1.0.1) - Scroll > On top of gridlist or scrollbar - Page up and page down > Scrolling on gridlist How to start working with it? Login as admin /debugscript 3 If you are interested in trying it out, send me a pm. Join the closed beta, send me a pm (You don't have to write much information in it, just that you want it) After collecting and solving all the features and bugs, I will place it on the community, included with the names of everybody that came with suggestions/feedback. (Giving feedback is not just filling in the poll, but reply here with your opinion/suggestions) Scripters who already joined the beta: (1.0.0) MoDeR2014 DavidxD814 _Evo_ CrZy Shan ozulus EstrategiaGTA draobrehtom -Blaze- ma2med 3B00DG4MER (1.0.1) ramzi CodyL Blue Pie Tekken ShuxTemp AboShanab (1.0.2) wesleywillems17 KariiiM CoreyHUN (1.0.3) Syntrax# OmerFrk Xenius Memerrus Beta 1.0.1: Beta 1.0.2: Starting and stopping resources? Status running Status not running Important! from (1.0.1): The key combination to show the cursor is now: Left shift + Z If you are interested in trying it out, send me a pm. Join the closed beta, send me a pm or NEW reply on the topic itself! (You don't have to write much information in it, just that you want it)
-
I thought Target range was for showing: https://wiki.multitheftauto.com/wiki/Se ... kerEnabled That health bar marker on top of the head, but I am not sure.
-
moveObject_(unpack(movingData)) *(typo, can't type well on mobile)
-
local ignoreObjects = { [10324]=true, [10329]=true, [10330]=true, [10331]=true, [10332]=true, [10715]=true, [10719]=true } for i=550,20000 do if not ignoreObjects[i] then removeWorldModel(i,10000,0,0,0) end end setOcclusionsEnabled(false)
-
Nice! Btw, it had to be: local moveObject_ = moveObject function moveObject (...) local movingData = {...} moveObject_(unpack(movingData_)) setElementData(movingData[1], "moveObjectEndTime", getTickCount() + movingData[2], false) end -_-", my wrapper fails haha
-
That .lua file is only for controlling the map_loader resource, it can be merged with any kind of resource. From there it can load every map you want. exports["map_loader"]:loadMapForTarget(root, "sth-jackson") Read the instructions at the top carefully.
- 14 replies
-
https://wiki.multitheftauto.com/wiki/Split or https://wiki.multitheftauto.com/wiki/Gettok
-
try to use png-8, it is limited in settings but renders with better quality. (and is 20%/40% smaller) Works great with a monochrome images. Save the images to textures, before rendering will also improve the quality and render speed.
-
objects that move with the moveObject function, do not have any velocity. They simply get set at position every frame. If you use the moveObject function, you should already know if it is moving or not, since you set the duration. local movingData_ = movingData function movingData (...) local movingData = {...} moveObject(unpack(movingData_)) setElementData(movingData[1], "moveObjectEndTime", getTickCount() + movingData[2], false) end if getElementData(object,"moveObjectEndTime") > getTickCount() then outputChatBox("object is moving") else outputChatBox("object is NOT moving") end
-
local target = getPlayerFromName("myName") if target then exports["map_loader"]:loadMapForTarget(target, "sth-jackson") end This map loader is for scripters, there is no CLI(command line interface) or GUI because it is irrelevant for the target user.
- 14 replies
-
As MrTasty says. If the referention of a userdata is always correct, even when using a timer, the warnings in the console wouldn't be valid. Yet they(warnings) are there, at places where hé did exacly the same as your example. #Roots wants to get rid of all those errors, this is how he can do that.
-
no, setTimer( function(p) if isElement(p) then setElementVelocity(p, ...) -- or whatever end end, 5000, 1, source )
-
1. Elements can turn invalid(destroyed) during the timer delay. So check with the function isElement if the elements are valid after the timer end. isElement 2. Source elements must pas through parameters in order to use them properly. In some parts of your script you did that, but in other parts not. And that crash might be caused by the terrible amount of timers you use. Vehicle respawning can be done with 1 timer, for ALL vehicles.
-
You can use it serverside. You can use the synchronization of mta. (which doesn't always works dual the data reduction and optimization) Or you use trigger events to request the data. (which has of course a delay, PING, because it isn't streamed)
-
Nope, see this page: https://wiki.multitheftauto.com/wiki/Sy ... l_settings It is synced, but we don't know when it is synced.
-
It is a nil value when the player isn't syncing his camera. I don't know when that happens, but probably when the player is dead.
-
Put those higher: tractionMultiplier tractionLoss tractionBias But don't go extreme! Use hedit to find the right values!
-
Calling/executing the function getLocalization will return a table. A table is an object that can hold multiple data. To get data from a table you must index a table. This means searching inside the table using a value/object/something else, which leads or doesn't lead to data inside the table. This is how you search inside a table[key]. Between those brackets you give the index/key of the data you want to receive. They key in your example is the string "code".
-
https://wiki.multitheftauto.com/wiki/SetElementPosition Set warp argument of setElementPositon to FALSE, syntax: bool setElementPosition ( element theElement, float x, float y, float z [, bool warp = true ] ) AND STOP SPAMMING!! ;@
-
Problem solved?
-
setPedAnimation ( source, "SILENCED", "SilenceCrouchfire", -1, true, false, false, true ) It is just counting.
-
[size=6][b]Optional Arguments[/b][/size] NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments. block: the animation block's name. anim: the name of the animation within the block. [b]time: how long the animation will run for in milliseconds.[/b] [u][color=#00FF00][b]To -1?[/b][/color][/u] [b] loop: indicates whether or not the animation will loop.[/b] [u][color=#00FF00][b]To true?[/b][/color][/u] updatePosition: will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations. interruptable: if set to 'false' other tasks wont be able to interupt the animation. Setting this to 'false' also gives this function more power to override other animations that are running. For example, squatting after a jump can be terminated. freezeLastFrame: ... (From 1.1 onwards). https://wiki.multitheftauto.com/wiki/SetPedAnimation