-
Posts
1,412 -
Joined
-
Last visited
-
Days Won
2
Everything posted by WASSIm.
-
Client addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then local x, y, z = getElementPosition ( theVehicle ) local rx, ry, rz = getElementRotation ( theVehicle ) minigunOne = createWeapon ( "minigun", x, y, z ) setElementAlpha ( minigunOne,0) attachElements ( minigunOne, theVehicle, 0.15, 0, 1.3, 0, 0, 93 ) bindKey ( "mouse1", "down", enableFire ) bindKey ( "mouse1", "up", disableFire ) end end ) addEventHandler("onClientVehicleExit", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then if minigunOne then destroyElement (minigunOne) unbindKey ( "mouse1", "down", enableFire ) unbindKey ( "mouse1", "up", disableFire ) end end end ) function enableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "firing" ) end, 50, 1) MiniSound = playSound( "Pro_Minigun.wav", true) setSoundVolume(MiniSound, 0.4) setSoundSpeed ( MiniSound, 0.9 ) end end function disableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "ready" ) end, 50, 1) stopSound ( MiniSound ) end end function mgRotate () if minigunOne then triggerServerEvent ("mgserver", source, mgserver) setElementRotation(minigunOne,rotX,rotY,rotZ) end end addEventHandler ( "onClientRender", root, mgRotate ) Server function mgserver () rotX,rotY,rotZ = getCameraMatrix (source) end addEvent("mgserver",true) addEventHandler("mgserver", root, mgserver)
-
i fix my problem thx all
-
i dont have copies of resources
-
hi guys i have problem in server
-
not work function mgRotate ( ) if minigunOne then rotX,rotY,rotZ = getElementRotation ( getLocalPlayer () ) setElementRotation(minigunOne,rotX,rotY,rotZ) end end addEventHandler ( "onClientRender", root, mgRotate )
-
i want if move Which shot water and move minigun addEventHandler("onClientVehicleEnter", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then local x, y, z = getElementPosition ( theVehicle ) local rx, ry, rz = getElementRotation ( theVehicle ) minigunOne = createWeapon ( "minigun", x, y, z ) setElementAlpha ( minigunOne,255) attachElements ( minigunOne, theVehicle, 0.15, 0, 1.3, 0, 0, 93 ) bindKey ( "mouse1", "down", enableFire ) bindKey ( "mouse1", "up", disableFire ) end end ) addEventHandler("onClientVehicleExit", root, function(thePlayer, seat) local theVehicle = source if seat == 0 and thePlayer == localPlayer and getElementModel(theVehicle) == 601 then if minigunOne then destroyElement (minigunOne) unbindKey ( "mouse1", "down", enableFire ) unbindKey ( "mouse1", "up", disableFire ) end end end ) function enableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "firing" ) end, 50, 1) MiniSound = playSound ( "Pro_Minigun.wav",true) setSoundVolume(MiniSound, 0.4) setSoundEffectEnabled(MiniSound,"gargle",true) setSoundSpeed ( MiniSound, 0.9 ) end end function disableFire() if isTimer(MGtimer) and minigunOne then killTimer(MGtimer) else MGtimer = setTimer(function() setWeaponState ( minigunOne, "ready" ) end, 50, 1) stopSound ( MiniSound ) end end
-
debugscript : SERVER function weapontankswat ( ) local vehicles = getElementsByType ( "vehicle" ) for vehicleKey, vehicleValue in ipairs(vehicles) do x, y = getVehicleTurretPosition (vehicles) x = math.deg ( x ) y = math.deg ( y ) weapon = triggerClientEvent ("weapontank", root, vehicles) attachElementToElement ( weapon,vehicles, 0, 0, 5 ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), weapontankswat ) function destroy ( ) destroyElement( weapon ) end addEventHandler ( "onPlayerVehicleExit", getRootElement(), destroy ) CLIENT function weapontank ( ) weapon = createWeapon ( m4, x, y, 0 ) end addEvent ( "weapontank", true ) addEventHandler ( "weapontank", root, weapontank)
-
+1111111111111 i like this
-
hi guys how make tank SWAT shot minigun or minigun hunter
-
When they die you destroy only the latest blip for the dying zombie, what about the other blips that you created in the pointless loop? They stay on the map. See what you're doing wrong? blip no destroyed !
-
hi guys i have problem want if destroy zombie and destroy blip zombie blips = { } addEvent ( "onZombieSpawn", true ) addEventHandler ( "onZombieSpawn", root, function ( ) for _, v in ipairs ( getElementsByType ( "ped" ) ) do if getElementData ( v, "zombie" ) then if ( not blips [ v ] ) then blips [ v ] = createBlipAttachedTo ( v, 0 ) end end end end ) addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( ) if ( isElement ( blips [ source ] ) ) then destroyElement ( blips [ source ] ) end end )
-
https://community.multitheftauto.com/ind ... ls&id=6466 original: https://community.multitheftauto.com/index.php?p= ... ls&id=6324 DONE
-
this bar exp is show me level and not show me exp -Code removed-
-
nothing add triggerClientEvent ("PGHPVis", root) ????
-
اسمك: wassmas اسم الفكرة :غانغ سيستآم شرح للفكرة : يسطتيع العب عمل عصبته الخصت فائدة الفكرة: لسعد ألعب أعضأ عصبتو
-
i change new dx bar health and make show health in marker bot SERVER local spawnTable = { [1] = {-1935.5, 665.4, 47}, [2] = {2561.4,2779,11}, [3] = {-1008,-651,33}, [4] = {2203,-2250,14}, } local weaponTable = { [1] = {38}, [2] = {37}, } local x,y,z = unpack(spawnTable[math.random(1,4)]) local weapons = unpack(weaponTable[math.random(1,2)]) local Marker1 = createMarker ( x, y, z, "cylinder", 5, 200, 200, 200, 200 ) function Nemesisbymanawydan (player ) nemesi = exports [ "slothBot" ]:spawnBot (x,y,z, 90, 271, 0, 0, Nemesis, weapons, "hunting", true ) outputChatBox ("Nemesis: STARS", getRootElement(), 255, 0, 0, true ) exports [ "extrahealth" ]:setElementExtraHealth ( nemesi, 2000 ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) myMarker = (attachElements (Marker1, nemesi, 0, 0, 0 )) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) function markerplayer( ) triggerClientEvent ("PGHPVis", root, nemesi) end addEventHandler ( "onMarkerHit", Marker1, markerplayer ) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) killerName = getPlayerName(killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=0,b=0},"Nemesis"},getRootElement(),wr,wg,wb ) destroyElement(myBlip) setTimer(Nemesisbymanawydan, 1000, 1) end end) CLIENT setDevelopmentMode(true) local MsgDisplayed local MsgTimer local screenWidth,screenHeight = guiGetScreenSize() local ProgressHPSettings = { nemesi = nil; x = screenWidth-450; y = screenHeight*0.23; w = 350; h = 45; colorBg = tocolor(0,0,0,180); colorUg = tocolor(255,28,28,180); colorText = tocolor(255,255,255,255); } function drawProgressHPBar() dxDrawRectangle ( ProgressHPSettings.x, ProgressHPSettings.y, ProgressHPSettings.w, ProgressHPSettings.h, ProgressHPSettings.colorBg, false ) dxDrawRectangle ( ProgressHPSettings.x+10, ProgressHPSettings.y+5, ((ProgressHPSettings.w-20)*(exports[ "extrahealth" ]:getElementExtraHealth ( ProgressHPSettings.nemesi )/getElementData(ProgressHPSettings.nemesi,'startHP')) > 0 and (ProgressHPSettings.w-20)*(exports[ "extrahealth" ]:getElementExtraHealth ( ProgressHPSettings.nemesi )/getElementData(ProgressHPSettings.nemesi,'startHP')) or 0), ProgressHPSettings.h-10, ProgressHPSettings.colorUg, false ) dxDrawText ( tostring(math.floor(exports[ "extrahealth" ]:getElementExtraHealth ( ProgressHPSettings.nemesi ) > 0 and exports[ "extrahealth" ]:getElementExtraHealth ( ProgressHPSettings.nemesi ) or 0)).."hp/"..tostring(math.floor(getElementData(ProgressHPSettings.nemesi,'startHP') > 0 and getElementData(ProgressHPSettings.nemesi,'startHP') or 0)).."hp", ProgressHPSettings.x+10, ProgressHPSettings.y+5, (ProgressHPSettings.x+10) + (ProgressHPSettings.w-20), (ProgressHPSettings.y+5)+(ProgressHPSettings.h-10), ProgressHPSettings.colorText, 1.5, "default", "center", "center", true, true, false, false, true) end addEvent ( "showMsg", true ) addEventHandler ( "showMsg", root, function (t, clr) if ( not MsgDisplayed ) then MsgDisplayed = dxMsgWindow:create( t, 0.35, 0.01, 0.3, 0.05, true, "default", 1, "center","center" ) MsgDisplayed:colorText(unpack(clr)) MsgDisplayed:colorRect(0,0,0,180) MsgTimer = setTimer(function()MsgDisplayed:destroy();MsgTimer=nil;MsgDisplayed=nil;end,8000,1) return end MsgDisplayed:text(t) MsgDisplayed:colorText(unpack(clr)) resetTimer ( MsgTimer ) end ) addEvent ( "PGHPVis", true ) addEventHandler ( "PGHPVis", root, function (el) if ( el ) then ProgressHPSettings.nemesi = el addEventHandler("onClientRender", root, drawProgressHPBar) else ProgressHPSettings.nemesi = nil; removeEventHandler("onClientRender", root, drawProgressHPBar) end end ) debugscript 3
-
i don't understand you can give me script fix plis
-
this script show health bot in DX and not working CLIENT function onshowhealthnemesis ( nemesi) dxDrawText("Health Nemesis: ".. getElementHealth(tostring(nemesi)), 10, (screenH - 16) / 2, (10) + 154, ( (screenH - 16) / 2) + 16, tocolor(255, 0, 0, 255), 1, "default-bold", "left", "top", false, false, true, false, false) end addEvent("onshowhealthnemesis", true) addEventHandler( "onshowhealthnemesis", getRootElement(), onshowhealthnemesis ) SERVER showBox ("info","Just some information") local spawnTable = { [1] = {-1935.5, 665.4, 47}, [2] = {2561.4,2779,11}, [3] = {-1008,-651,33}, [4] = {2203,-2250,14}, } local weaponTable = { [1] = {38}, [2] = {37}, } function Nemesisbymanawydan (player ) local x,y,z = unpack(spawnTable[math.random(1,4)]) local weapons = unpack(weaponTable[math.random(1,2)]) nemesi = exports [ "slothBot" ]:spawnBot (x,y,z, 90, 271, 0, 0, Nemesis, weapons, "hunting", true ) triggerClientEvent ("onshowhealthnemesis", getRootElement(), nemesi) outputChatBox ("Nemesis: STARS", getRootElement(), 255, 0, 0, true ) myBlip = (createBlipAttachedTo ( nemesi, 23 )) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(4000,6000)) killerName = getPlayerName(killer) weapon = getPedWeapon(killer) wr, wg, wb = getPlayerNametagColor(killer) exports.killmessages:outputMessage ( {killerName,{"padding",width=3},{"icon",id=weapon or 0},{"padding",width=3},{"color",r=255,g=0,b=0},"Nemesis"},getRootElement(),wr,wg,wb ) destroyElement(myBlip) setTimer(Nemesisbymanawydan, 1000, 1) end end) if restart script if i killing bot
-
i can fix just bar level and exp not work local sx, sy = guiGetScreenSize() function drawExperience() dxDrawRectangle((310/1024)*sx,(698/768)*sy,(481/1024)*sx,(36/768)*sy,tocolor (255,255,255,35),false) dxDrawRectangle((315/1024)*sx,(703/768)*sy,(472/1024)*sx,(26/768)*sy,tocolor(0,0,0,255),false) local experience = getElementData(localPlayer,"experience") or 0 local experience_n = getElementData(localPlayer,"experience_n") or 0 local level = getElementData(localPlayer,"level") or 1 local percent = (experience / experience_n * 100) if (percent >= 100) then percent = 100 elseif (experience_n < 1) then percent = 0 end dxDrawRectangle((320/1024)*sx,(706/768)*sy,(tonumber(percent)*4.64/1024)*sx,(20/768) *sy,tocolor(255,255,255,75),false) dxDrawBorderedText("Level: ".. tostring(level) .." | Experience Points: ".. tostring (experience) .." > ".. tostring(experience_n),(430/1024)*sx,(707/768)*sy,(667/1024)*sx,(724/768) *sy,tocolor(0,0,0,255),(sx/1024)*0.6,"bankgothic","center","center",false,false,false) end addEventHandler("onClientRender",root,drawExperience) function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) -- black dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 255, 255, 255, 255 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end addEvent ( "LevelUpEffect", true ) addEventHandler ( "LevelUpEffect", root, function ( ) PlayerLevelUpSound() addEventHandler("onClientRender",root,DrawLevelUp) setTimer(function() removeEventHandler("onClientRender",root,DrawLevelUp) end, 4000, 1) end ) function PlayerLevelUpSound() local sound = playSound("levelup.mp3") setSoundVolume(sound, 1) end function DrawLevelUp() dxDrawBorderedText( "LEVEL UP!!!", sx/2, sy/15, sx/2, sx/2, tocolor(255,144,0,255), (sx/1024)*2.5,"bankgothic","center","center",false,false,false ) end