-
Posts
6,060 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
You can't animate a texture. But you can render different textures as frames for an animation. For repeating use: https://wiki.multitheftauto.com/wiki/DxDrawMaterialSectionLine3D
-
lol my lowLOD objects are doing a better job. I assigned them to an object, maybe that matters. Also are you mta settings max out?
-
Use an object like a sea floor as basis element.
-
object createObject ( int modelid, float x, float y, float z, [ float rx, float ry, float rz, bool isLowLOD = false ] ) Set to true. Works for me very good, see screenshots:
-
You can only set specific sound-groups and sounds on and off with:setWorldSoundEnabled
-
Screen size or marker size? If I am understanding it correctly: "The size of the marker will de-increase and disappear when a player resizes their screen (when they are using window mode)?" Or do you mean this: "The size of the marker will de-increase and disappear when a player moves their screen? But it will be back to default when they stop moving it?" Or this: "The large marker will disappear when the player his screen goes inside of the marker?" ( I know this one. It can't be solved because of GTA limitations. You need a dx solution or an object.) And give me some real context, for example a screenshot.
-
I am missing some context and code.
-
local textInProgress = "" for i,v in ipairs(value) do local wordWidth = dxGetTextWidth(textInProgress) textInProgress = textInProgress .. v dxDrawText(v,screenW * 0.8318 + wordWidth, screenH * 0.4852, screenW * 0.8318 + wordWidth + 10, screenH * 0.5157, tocolor(255, 255, 255, 255),2, "default","left", "center", false, false, false, false, false) end Something like this. Do not align the X axis with center, because dxDrawText is working with a bounding box and not with `width` properties. Required Arguments text: the text to draw left: the absolute X coordinate of the top left corner of the text top: the absolute Y coordinate of the top left corner of the text Optional Arguments right: the absolute X coordinate of the right side of the text bounding box. Used for text aligning, clipping and word breaking. bottom: the absolute Y coordinate of the bottom side of the text bounding box. Used for text aligning, clipping and word breaking.
-
That is obvious, every character has a different width so the spaces are different as well. Pick a font which has the same character width for every character. Or use this function: https://wiki.multitheftauto.com/wiki/DxGetTextWidth
-
I am not sure what exactly the problem is. Try to use call instead of exports if you are 100% sure the returned values of the function are correct. call https://wiki.multitheftauto.com/wiki/Call And always validate data, which you receive from a function before continuing executing more code. local targetPlayer, tinta = exports.global:findPlayerByPartialNick(thePlayer, targerPlayer) < < < Validation moment: if targetPlayer and tinta then outputChatBox("I-ai aratat buletinul lui "..tinta.. ".", thePlayer, 255, 178, 102) outputChatBox("Buletinul lui "..nume_jucator, tinta, 255, 178, 102) outputChatBox(" ", tinta, 0, 0, 0) outputChatBox("#C0C0C0San Andreas #66B2FFSan #FFFF33Andr#FF0000eas #C0C0C0San Andreas", targetPlayer, 255, 255, 255, true) outputChatBox(" ", targetPlayer, 0, 0, 0) outputChatBox("#FFFF66Nume si Prenume:#FFFFFF "..nume_jucator, targetPlayer, 255, 255, 255, true) outputChatBox("#FFFF66Domiciliu:#FFFFFF Los Santos", targetPlayer, 255, 255, 255, true) outputChatBox("#FFFF66Data Nasterii:#FFFFFF "..exports.global:getPlayerDoB(thePlayer), targetPlayer, 255, 255, 255, true) < < < end
-
How can i check if object has hitted by projectile ?
IIYAMA replied to iMr.WiFi..!'s topic in Scripting
Hmm all you can do is checking with the bounding box then. https://wiki.multitheftauto.com/wiki/GetElementBoundingBox Afaik there was ones a resource called: `Server collision` from CrystalMV (His resource site is offline) Which contains math functions to do these calculations with block/rectangle formats. I might have somewhere a copy left of it, if you want it. (let me know) -
How can i check if object has hitted by projectile ?
IIYAMA replied to iMr.WiFi..!'s topic in Scripting
I am not sure what you mean with passed. Because it can only pass an object when the object has no collision or is streamed out. But you could try to collect information about the projectile like this; https://wiki.multitheftauto.com/wiki/OnClientProjectileCreation And use: https://wiki.multitheftauto.com/wiki/OnClientElementDestroy To located it's last position and the moment of detonation. And use: https://wiki.multitheftauto.com/wiki/OnClientPreRender To detect anything that happens during the flight. (moment to detect the exact impact location) The projectile creator will be always available, except when the rocket explodes in an instance. (impact too close to the rocketlauncher) The rocket projectile will not trigger the lua event when this happens. -
How about you set it at 49 players and add in the description that it is for 48 players only? The only way to do this, is by using a second server which will redirect you to the main server.
-
How can i check if object has hitted by projectile ?
IIYAMA replied to iMr.WiFi..!'s topic in Scripting
The processLineOfSight function would give you some information about it. https://wiki.multitheftauto.com/wiki/ProcessLineOfSight It works just fine, I use it to detonate a rocket projectile. It doesn't matter if the object is serverside or clientside, because an serverside object is visible on clientside and a projectile is only available clientside. (Maybe I do not understand your question.) -
Afaik the only damage the rhino can receive(on GTA LEVEL) is collision damage and fire damage. The rest of the damage you have to overwrite with onClientPlayerWeaponFire and onClientExplosion.
-
function getTeamDataFromName (name) for i=1, #TeamTable do if TeamTable[i][1] == name then return TeamTable[i] end end return false end Usage: local teamName = getTeamName(playerTeam) if teamName then local teamData = getTeamDataFromName (teamName) -- returns the sub-table if successfull, else false. if teamData then -- do your thing end end There are more ways to do this.
-
@kieran Oh and one last thing: bool addEvent ( string eventName [, bool allowRemoteTrigger = false ] ) If you use the addEvent function, you can allow and disallow triggers from different sides(client/server) TRUE = enabled I recommend you to add this function to the resource where you are also triggering from, because if you trigger an event which isn't added yet, you would receive warnings.
-
local x, y, z = getElementPosition( robmarker1 ) if x == 3099.97 and y == -3281.69 and z == -0.5 then
-
There is no triggerEvent for changing team. All triggerEvents are global, so that is already happening. It just depends how and under which element you add the handler.
-
1. @Bonus Names like 1_7_0 are a remaining of a decompiled script. Because when a script is compiled all variables names are lost. A decompiler will assign names like that to make it work again.
-
@xeon17 It is a kind of addiction, except for the wasting part. I am well aware that I shouldn't. If you had some lessons around ethical, you would know what I am talking about. Because it is a very common addiction and most of the time overlooked. Yet, everybody has this addiction. With other words: the feeling of being needed.
-
local prices = {["Beagle"] = 300, ["Shamal"] = 30,["Dodo"] = 0, ["Nevada"] = 1000, ["Crop Dustler"] = 2435, ["Stuntplane"] = 3435} iprint(prices["Dodo"]) -- price: 0 (I don't pay for dead stuff)