-
Posts
373 -
Joined
-
Last visited
-
Days Won
12
Everything posted by Hydra
-
local txd = {} local dff = {} local col = {} txd[1] = engineLoadTXD ( "mod1.txd" ) engineImportTXD ( txd[1], 3356 ) dff[1]= engineLoadDFF ( "mod1.dff" ) engineReplaceModel ( dff[1], 3356 ) col[1] = engineLoadCOL( "mod1.col" ) engineReplaceCOL( col[1], 3356 ) txd[2] = engineLoadTXD ( "mod2.txd" ) engineImportTXD ( txd[2], 3357 ) dff[2] = engineLoadDFF ( "mod2.dff" ) engineReplaceModel ( dff[2], 3357 ) col[2] = engineLoadCOL( "mod2.col" ) engineReplaceCOL( col[2], 3357 ) just an example Is not required to put local txd = {}, you can put txd1, txd2 etc.. but it's more easy to do like the example above.
-
https://wiki.multitheftauto.com/wiki/OnClientExplosion this is the event
-
You posted this in the wrong place
-
You will need to use these: setElementModel() ---GUI--- onClientGUIClick ---DX---- onClientClick
-
If you want your object to spin use moveObject() instead moveObject(theObject, timer, x, y, z, rotX, rotY, rotZ)
-
Look at the default race resource and see how it was made
-
You forgot to put the rotation arguments in the function: function rotateobj(obj, rx, ry, rz) setElementRotation(obj, rx, ry, rz) end Make sure you put the function in the meta.xml too <export function="rotateobj" type="shared" /> Type can be: client, server or shared local abc = exports.yourResource --// This is more easy than to put exports.resource:function local building = createObject(18002, 0, 0, 5) function rotatingObject() abc:rotateobj(building, 0, 0, 5) end addCommandHandler("rotatemyobj", rotatingObject)
-
for money and skin you can use setAccountData, getAccountData, setElementData & getElementData. For faction better use database(db) https://wiki.multitheftauto.com/wiki/setAccountData https://wiki.multitheftauto.com/wiki/GetAccountData https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/GetElementData https://wiki.multitheftauto.com/wiki/Database
-
using interpolateBetween Small example: local abc = false local alpha = 0 local tick = 0 function d() if abc then alpha = interpolateBetween(0, 0, 0, 255, 0, 0, (tick-getTickCount())/2500, "Linear") else alpha = interpolateBetween(255, 0, 0, 0, 0, 0, (tick-getTickCount())/2500, "Linear") end dxDrawRectangle(screenW * 0.2000, screenH * 0.3000, screenW * 0.0600, screenH * 0.0600, tocolor(255, 0, 0, alpha), false) end addEventHandler("onClientRender", root, d) function anim() if not animState then animState = true abc = true else animState = false abc = false end end bindKey("f2", "down", anim)
-
setElementPosition(localPlayer, x-yourValue, y, z+0.5) ex
-
Imo you can use both.
-
You can use engineApplyShaderToWorldTexture and make client -> server -> client to be visible for others too
-
set an element data for that group and use this: function a() if getElementData(localPlayer, "ClanName") then -- do something here else outputChatBox("You are not allowed to use this command", 255, 0, 0) end end addCommandHandler("abc1", a)
-
Try reset your binds from MTA Settings
-
You use the same variable for all of them, try using something like dff1, dff2, txd1, txd2 etc..
-
Yes it's possible to do that with rectangle too
-
local myMarker = createMarker(0, 0, 5, "cylinder", 1.5, 255, 255, 255, 255, getRootElement()) function a(hitElement, matchingDimension) if hitElement == source then killPed(hitElement) else end end addEventHandler("onPlayerMarkerHit", myMarker, a) Is this what you want?
-
For text to be good positioned I use this: local screenW, screenH = guiGetScreenSize() resW = screenW/1600 --(put your resolution here instead of 1600) resH = screenH/900 --(put your resolution here instead of 900) function a() dxDrawText("asd", screenW * 0.2000, screenH * 0.3000, screenW * 0.0350, screenH * 0.0350, tocolor(255, 255, 255, 255), 1.00*resW, "bankgothic", "left", "top", false, false, false, false) end -- I put *resW on the text scale
-
onClientVehicleDamage or onVehicleDamage
- 1 reply
-
- 1
-
-
Use the resource texture_names to see the blips texture name, create all blips on the map in different positions and that's it
-
Use engineApplyShaderToWorldTexture