-
Posts
1,312 -
Joined
-
Last visited
Everything posted by KariiiM
-
Good job Elrond, keep the the good job
-
Hey,use translation to let helpers understand your point and to let it safe,if you're talking with spanish language then,you have to go to this section "Other Languages" https://forum.multitheftauto.com/viewforum.php?f=117
-
You've to check if the player who hitting marker is a localPlayer. Example: function MarkerHit(hitPlayer,matchingDimension) if( hitPlayer == localPlayer ) then guiSetVisible (windowname,true) showCursor (true) end end addEventHandler ("onClientMarkerHit",Marker,MarkerHit)
-
Helle guys, i have a small problem in same time big one, i scripter a simple shop for fun everything scripted sucessfully but ,When i add the Event "onVehicleExplosde",if just one player's vehicle explosed then all other vehicles gonna explodes too. Thanks in advance. function onVehicleExplode() destroyElement(Vehicle) end addEventHandler("onVehicleExplode", getRootElement(), onVehicleExplode) Here's a part of my code: --Ser-Side: function onVehicleExplode() destroyElement(Vehicle) end addEventHandler("onVehicleExplode", getRootElement(), onVehicleExplode) local Cash = 500000 function rentVehicle () if ( getPlayerMoney ( source ) < Cash ) then outputChatBox("You need 300,000$ to rent this vehicle.", source, 255,0,0) else takePlayerMoney(source, Cash) if (getElementZoneName(source) == "Los Santos International") then Vehicle= createVehicle(425, 1924.5841064453, -2291.1552734375, 13.5) warpPedIntoVehicle(source, Vehicle) else Vehicle= createVehicle (425,1485.49, 1231.93, 10.82,0,0,180) end warpPedIntoVehicle(source, Vehicle) end end addEvent ("rentV", true) addEventHandler ("rentV", root, rentVehicle)
-
It won't works,you just added createFire in the setTimer, and createFire is already added with a difinition "fire", no need to do it two more time
-
Try now function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( fire, 99999999, 1,true) end addCommandHandler ( "fire", fireRocks )
-
Use, setTimer Do an unlimited number, like 999999..
-
Check the example here. https://wiki.multitheftauto.com/wiki/SmoothMoveCamera
-
To do like what is in the picture, you've to attach an weapon named "Molotov Cocktails" in that object ! Molotov ID =18
-
Aw i just changed one line and its far of triggering..etc
-
Well,try that i think i got your problem classWnd = guiCreateWindow(185, 129, 479, 407, "Spawn Panel", false) guiWindowSetSizable(classWnd, false) guiSetVisible(classWnd, false) spawnG = guiCreateGridList(5, 27, 167, 160, false, classWnd) guiGridListAddColumn(spawnG, "Allies", 0.9) skins = { {"M4 Sherman", 287}, {"M26 Pershing (not available)", 171}, } for i,skins in ipairs(skins) do row = guiGridListAddRow(spawnG) guiGridListSetItemText(spawnG, row, 1, tostring(skins[1]), false, false) guiGridListSetItemData(spawnG, row, 1, tostring(skins[2])) end guiGridListAddRow(spawnG) spawnbtn = guiCreateButton(35, 200, 102, 44, "To battle!", false, classWnd) desc = guiCreateMemo(10, 260, 459, 140, "Welcome to World of Tanks MTA server! Choose your team!", false, classWnd) guiMemoSetReadOnly(desc, true) guiCreateLabel(166, 242, 136, 13, "Spawn Panel By Shaman", false, classWnd) function joinAllies() if ( source == spawnbtn ) then local row, col = guiGridListGetSelectedItem( spawnG ) local name = guiGridListGetItemText( spawnG, row, col ) if name == "M4 Sherman" then local id = 287 triggerServerEvent("spawn_sherman", getLocalPlayer(), id) guiSetVisible(classWnd, false) showCursor(false) elseif name == "M26 Pershing" then local id = 171 triggerServerEvent("spawn_pershing", getLocalPlayer(), id) guiSetVisible(classWnd, false) showCursor(false) end end end addEventHandler("onClientGUIClick",root,joinAllies) addEventHandler("onClientGUIClick",root,joinSurvivor) spawnG2 = guiCreateGridList(302, 27, 167, 160, false, classWnd) guiGridListAddColumn(spawnG2, "Axis", 0.9) skins = { {"Tiger I Ausf E", 270}, {"King Tiger II (not available)", 127}, } for i,skins in ipairs(skins) do row = guiGridListAddRow(spawnG2) guiGridListSetItemText(spawnG2, row, 1, tostring(skins[1]), false, false) guiGridListSetItemData(spawnG2, row, 1, tostring(skins[2])) end guiGridListAddRow(spawnG2) spawnbtn2 = guiCreateButton(330, 200, 102, 44, "To battle!", false, classWnd) function joinAxis() if ( source == spawnbtn2 ) then local row, col = guiGridListGetSelectedItem( spawnG2 ) local name = guiGridListGetItemText( spawnG2, row, col ) if name == "Tiger I Ausf E" then local id = 270 triggerServerEvent("spawn_tiger", getLocalPlayer(), id) guiSetVisible(classWnd, false) showCursor(false) elseif name == "King Tiger II" then local id = 127 triggerServerEvent("spawn_tiger2", getLocalPlayer(), id) guiSetVisible(classWnd, false) showCursor(false) end end end addEventHandler("onClientGUIClick",root,joinAxis) addEventHandler("onClientGUIClick",root,joinSwag) addEvent("showGUI", true) function guishow(player) guiSetVisible(classWnd, true) showCursor(true) sound = playSound("music/music.mp3") setSoundVolume(sound, 0.5) end addEventHandler("showGUI",getRootElement(),guishow) --music function startSound (killer, weapon, bodypart) sound = playSound("music/music.mp3", true) setSoundVolume(sound, 0.5) end addEventHandler("onClientPlayerWasted", getResourceRootElement(getThisResource()), startSound) function destroySound() if isElement(sound) then destroyElement(sound) end end addEventHandler("onClientPlayerSpawn", getResourceRootElement(getThisResource(), destroySound)
-
Check if the folder/file of the sounds is the same as in meta.xml
-
Write it here ,because the link doesn't works for me
-
You're welcome.
-
Dude,no need to create 2nd topic, i already solved it https://forum.multitheftauto.com/viewtopic.php?f=91&t=90645
-
Try it, it should works. function putAttachedElementsOnBones() for element,ped in pairs(attached_ped) do if not isElement(element) then clearAttachmentData(element) elseif isElementStreamedIn(ped) then local bone = attached_bone[element] local x,y,z = getPedBonePosition(ped,bone_0[bone]) local xx,xy,xz,yx,yy,yz,zx,zy,zz = getBoneMatrix(ped,bone) local offx,offy,offz = attached_x[element],attached_y[element],attached_z[element] local offrx,offry,offrz = attached_rx[element],attached_ry[element],attached_rz[element] local objx = x+offx*xx+offy*yx+offz*zx local objy = y+offx*xy+offy*yy+offz*zy local objz = z+offx*xz+offy*yz+offz*zz if (not tonumber(tostring(objx)) or not tonumber(tostring(objy)) or not tonumber(tostring(objz))) then return end if (not tonumber(tostring(offrx)) or not tonumber(tostring(offry)) or not tonumber(tostring(offrz))) then return end local rxx,rxy,rxz,ryx,ryy,ryz,rzx,rzy,rzz = getMatrixFromEulerAngles(offrx,offry,offrz) local txx = rxx*xx+rxy*yx+rxz*zx local txy = rxx*xy+rxy*yy+rxz*zy local txz = rxx*xz+rxy*yz+rxz*zz local tyx = ryx*xx+ryy*yx+ryz*zx local tyy = ryx*xy+ryy*yy+ryz*zy local tyz = ryx*xz+ryy*yz+ryz*zz local tzx = rzx*xx+rzy*yx+rzz*zx local tzy = rzx*xy+rzy*yy+rzz*zy local tzz = rzx*xz+rzy*yz+rzz*zz offrx,offry,offrz = getEulerAnglesFromMatrix(txx,txy,txz,tyx,tyy,tyz,tzx,tzy,tzz) setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY") else setElementPosition(element,getElementPosition(ped)) end end end addEventHandler("onClientPreRender",root,putAttachedElementsOnBones)
-
Put a part of your code ,which have the error
-
Yeah,because createFire is client sided.
-
Did you added the login system to ACL ?