Leaderboard
Popular Content
Showing content with the highest reputation on 06/04/20 in all areas
-
Hello , i want to suggest to implement that you can change the horizontal sensitivity from the coreconfig file, cause you can only change the vertical sensitivity, and i wanna know if it is possible. Sorry for my bad english i'm from Argentina2 points
-
Quase isso, ele faz um salvamento do serial do jogador na tabela. Sendo assim, a verificação, será verificando a tabela, com o serial do jogador. Então, o tempo apenas removerá o serial do jogador da tabela, quando o tempo encerrar.1 point
-
Deixarei uma parte que será útil para você agregar em seu código. local tempo = { } addCommandHandler("armas", function( player ) if tempo[getPlayerSerial(player)] then return outputChatBox("Aguarde 30 Min Para Executar o Comando Novamente!", player, 255,255,255, true) end giveWeapon (player, 31, 50, true) tempo[getPlayerSerial(player)] = setTimer ( function ( serial ) tempo[serial] = nil end, 60000*30, 1, getPlayerSerial(player) ) end)1 point
-
still i can't find horizontal sens did you ever look into this?1 point
-
1 point
-
ربي يعطيك ماتتمنا نجح معي والله كنت افكر كتيرا كنت اظنه سورس كبير ولكن بهده البساطة راح افهمو بالتفصيل شكرا على الصبر معي1 point
-
1 point
-
1 point
-
1 point
-
Não existe essa de "player que está executando este recurso" no servidor. Ele é ativado pelo sistema e não pelo jogador. Você precisa especificar qual jogador deve ser teleportado pro veículo, mas no seu exemplo player não existe pois vc não declarou ele em lugar nenhum. Faça por comando, dai quem der o comando é o jogador que está interagindo com o resource. function tipob (thePlayer, cmd) -- thePlayer = jogador que executou o comando. carro = createVehicle (555, -2064.5, -83, 35) setVehicleColor (carro, 255, 255, 255) warpPedIntoVehicle (thePlayer, carro) end addCommandHandler ("carro", tipob) -- comando pra ativar essa função: /carro1 point
-
from the 256+ indexes returned the first ones are bass, not sure what you are trying to do with the bass data, but if it is some visual effect you can check if those indexes met some value, something like if index[1]>0.3 then bass met = apply effect1 point
-
الخطئ عندك في -80 خد جرب createRadarArea(1261.91357, -1653.42981, 80, 80, 255, 0, 175) pos = createColRectangle(1261.91357, -1653.42981, 80, 255, 0, 175)1 point
-
Como o Gw8 disse, faça a sync do shader com elementData, eu criei o código que vai fazer a sync para todos players, se quiser que seja para alguns você terá que editar. Código: pShaders = {} tTextures = {} addEventHandler( "onClientResourceStart", resourceRoot, function() tTextures["M4A1[057]"] = dxCreateTexture("image1.png") end ) addCommandHandler( "t", function() applyShader( tTextures, localPlayer, true ) end ) addCommandHandler( "v", function() removeShader( localPlayer, true ) end ) function applyShader( t, player, sync ) if type(t) == "table" and isElement(player) then for tex_name, tex_element in pairs(t) do local s = dxCreateShader('tex_replace.fx', 0, 0, true, 'ped') table.insert( pShaders, {s, tex_name} ) dxSetShaderValue(s, 'gTexture', tex_element) engineApplyShaderToWorldTexture(s, tex_name, player) end if sync then setElementData(player, "wTexChange", true) end end end function removeShader( player, sync ) if pShaders and isElement(player) then for _, t in pairs(pShaders) do engineRemoveShaderFromWorldTexture( t[1], t[2], player ) end if sync then setElementData(player, "wTexChange", false) end end end addEventHandler( "onClientElementDataChange", root, function(theKey, _, newValue) if theKey == "wTexChange" and source ~= localPlayer then if newValue == true then applyShader( tTextures, source ) elseif newValue == false then removeShader( source ) end end end ) Além do mais eu não testei esse código, e o mais importante, que o Gw8 também citou, é fazer ativação/desativação do shader com os eventos onClientElementStreamIn e onClientElementStreamOut.1 point
-
The ban on your previous serials (A6A84CE18590C3A7DD21AE9BDFD92492 and AAA9943E53E5E3DD33620DD7AD6E86A1) simply got copied over to your new serial, because you are evading the global ban issued against serial A6A84CE18590C3A7DD21AE9BDFD92492. The reason for this ban is known to you.. development of 4Life bots (a mining job bot, intended to abuse the MTA4Life gamemode). The act is called and categorized as such because you went to extensive technical lengths to try and bypass SD #31 and #32 detections, against macro/virtual input, used by that server. Please don't try to ban evade again, the duration will become longer every time you do so. Note that if you continue messing with this bot stuff after unban, you will face a permanent ban. @myhaze1 point
-
1 point
-
And you try to use it on client side, right? (and on client side you can't use 10th argument of createMarker, because player who can see the marker, can be only localPlayer, so just remove it)1 point
-
Please stop pretending that you're a random guy, we handled your appeal at https://forum.multitheftauto.com/topic/122733-ban-appeal/ and had to delete a lot of spam when you started pretending again. We will continue cleaning it up, bye1 point
-
1 point
-
ابي اكواد كيف اكتب فوق راس الاعب هاذ صح local screenWidth, screenHeight = guiGetScreenSize ( ) function createText ( ) local playerX, playerY, playerZ = getElementPosition ( localPlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) speed = getDistanceBetweenPoints3D ( 0, 0, 0, getElementVelocity ( vehicle ) ) addEventHandler ( "onClientRender", root, function ( ) if ( getDistanceBetweenPoints3D ( 0, 0, 3, getElementPosition ( localPlayer ) ) ) < 50 then local coords = { getScreenFromWorldPosition ( 0, 0, 3 ) } if coords[1] and coords[2] then dxDrawText ( "Console", coords[1], coords[2], coords[1], coords[2], tocolor(255,255,255), 1, "default-bold" ) end end end )1 point
-
local screenWidth, screenHeight = guiGetScreenSize ( ) function createText ( ) local playerX, playerY, playerZ = getElementPosition ( localPlayer ) local playerZoneName = getZoneName ( playerX, playerY, playerZ dxDrawText ( playerZoneName, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) dxDrawText ( playerZoneName, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" ) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) speed = getDistanceBetweenPoints3D ( 0, 0, 0, getElementVelocity ( vehicle ) ) addEventHandler ( "onClientRender", root, function ( ) if ( getDistanceBetweenPoints3D ( 0, 0, 3, getElementPosition ( localPlayer ) ) ) < 50 then local coords = { getScreenFromWorldPosition ( 0, 0, 3 ) } if coords[1] and coords[2] then dxDrawText ( "Console", coords[1], coords[2], coords[1], coords[2], tocolor(255,255,255), 1, "default-bold" ) end end end ) ركبت هذول المودات ... كيف اخليه يكتب فوق راس الكونسول Console1 point
-
ما تشتغل المهمة ---System--- function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end local rx,ry = guiGetScreenSize() local fontScale = (rx/1440) local rxs, rys = (rx/1440), (ry/900) function dxDrawFramedText(message, left, top, width, height, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, frameColor) color = color or tocolor(255, 255, 255, 255) frameColor = frameColor or tocolor(0, 0, 0, 255) scale = scale or 1.1 font = font or "default" alignX = alignX or "left" alignY = alignY or "top" clip = clip or false wordBreak = wordBreak or false postGUI = postGUI or false dxDrawText(message, left + 1, top + 1, width + 1, height + 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(message, left + 1, top - 1, width + 1, height - 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(message, left - 1, top + 1, width - 1, height + 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(message, left - 1, top - 1, width - 1, height - 1, frameColor, scale, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(message, left, top, width, height, color, scale, font, alignX, alignY, clip, wordBreak, postGUI) end TimeGuiSetDownC = { } function guiMoveDownToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,x,(w2*4),false) TimeGuiSetDownC[gui] = setTimer(guiMoveDownToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (y1 <= y) then killTimer(TimeGuiSetDownC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,x1,(y1-4),false) end end setTimer ( function () if getElementData(localPlayer, "DerbyMission") then triggerServerEvent('XDedDerby',localPlayer) end end, 5000, 0 ) addEventHandler("onClientRender", root, function() if getElementData(localPlayer, "DerbyMission") then if getElementDimension(localPlayer) ~= 55 then setElementData(localPlayer, "DerbyMission", false) else end cN = 0 for i, player in ipairs(getElementsByType("player")) do if getElementData(player, "DerbyMission") then cN = cN + 1 end end dxDrawRectangle(rxs*30, rys*555, rxs*100, rys*30, tocolor(0, 0, 0, 150)) dxDrawText("#FFFF00Player : #FFFFFF"..cN, rxs*40, rys*560, rxs*450, rys*350, tocolor(200, 200, 255, 255), rys*1.4, "default-bold", "left", "top", false, false, false, true) end end) local x, y = guiGetScreenSize() local movingSpeed = 5 local g_root = getRootElement( ) local g_resRoot = getResourceRootElement( getThisResource( ) ) local screenWidth, screenHeight = guiGetScreenSize( ) --Top-System--- TopMission = guiCreateStaticImage(0, y/1.7-(250/2), 0, 220, "Window.jpg", false) header = guiCreateStaticImage(0, 0, 500, 30, "Header.png", false, TopMission) guiSetAlpha ( TopMission, 0 ) guiCreateLabel(50, 5, 500, 100, "Top 5 Players On Derby Mission", false, header) ---------------- Label1 = guiCreateLabel(10, 50, 500, 100, "1 - ", false, TopMission) guiLabelSetColor(Label1,255,255,0) Label11 = guiCreateLabel(25, 50, 500, 100, getElementData(g_resRoot,"1") or "None", false, TopMission) Label2 = guiCreateLabel(220, 50, 500, 100, getElementData(g_resRoot,"1k") or "0", false, TopMission) if Label2 then guiLabelSetColor(Label2,0,255,0) end Label3 = guiCreateLabel(10, 80, 500, 100, "2 - ", false, TopMission) guiLabelSetColor(Label3,255,255,0) Label22 = guiCreateLabel(25, 80, 500, 100, getElementData(g_resRoot,"2") or "None", false, TopMission) Label4 = guiCreateLabel(220, 80, 500, 100, getElementData(g_resRoot,"2k") or "0", false, TopMission) if Label4 then guiLabelSetColor(Label4,0,255,0) end Label5 = guiCreateLabel(10, 110, 500, 100, "3 - ", false, TopMission) guiLabelSetColor(Label5,255,255,0) Label33 = guiCreateLabel(25, 110, 500, 100, getElementData(g_resRoot,"3") or "None", false, TopMission) Label6 = guiCreateLabel(220, 110, 500, 100, getElementData(g_resRoot,"3k") or "0", false, TopMission) if Label6 then guiLabelSetColor(Label6,0,255,0) end Label7 = guiCreateLabel(10, 140, 500, 100, "4 - ", false, TopMission) guiLabelSetColor(Label7,255,255,0) Label44 = guiCreateLabel(25, 140, 500, 100, getElementData(g_resRoot,"4") or "None", false, TopMission) Label8 = guiCreateLabel(220, 140, 500, 100, getElementData(g_resRoot,"4k") or "0", false, TopMission) if Label8 then guiLabelSetColor(Label8,0,255,0) end Label9 = guiCreateLabel(10, 170, 500, 100, "5 - ", false, TopMission) guiLabelSetColor(Label9,255,255,0) Label55 = guiCreateLabel(25, 170, 500, 100, getElementData(g_resRoot,"5") or "None", false, TopMission) Label10 = guiCreateLabel(220, 170, 500, 100, getElementData(g_resRoot,"5k") or "0", false, TopMission) if Label10 then guiLabelSetColor(Label10,0,255,0) end ------------------ addEvent('TopShowFiveDerbyTable',true) addEventHandler('TopShowFiveDerbyTable',resourceRoot, function( ) guiSetVisible(TopMission, true) addEventHandler( "onClientRender", getRootElement(), contractSubWindow ) guiSetText(Label11, getElementData(g_resRoot,"1") or "None") guiSetText(Label22, getElementData(g_resRoot,"2") or "None") guiSetText(Label33, getElementData(g_resRoot,"3") or "None") guiSetText(Label44, getElementData(g_resRoot,"4") or "None") guiSetText(Label55, getElementData(g_resRoot,"5") or "None") guiSetText(Label2, getElementData(g_resRoot,"1k") or "0") guiSetText(Label4, getElementData(g_resRoot,"2k") or "0") guiSetText(Label6, getElementData(g_resRoot,"3k") or "0") guiSetText(Label8, getElementData(g_resRoot,"4k") or "0") guiSetText(Label10, getElementData(g_resRoot,"5k") or "0") end) function contractSubWindow( ) local width, height = guiGetSize( TopMission, false ) local x, y = guiGetPosition( TopMission, false ) if width < 250 then guiSetSize( TopMission, width + movingSpeed, height, false ) guiSetAlpha ( TopMission, (guiGetAlpha(TopMission) + 0.015) ) if width > screenWidth - x then guiSetPosition( TopMission, (screenWidth - width), y, false ) end else guiSetSize( TopMission, 250 , height, false ) removeEventHandler( "onClientRender", g_root, contractSubWindow ) guiMoveToBack( TopMission ) setTimer(function() addEventHandler( "onClientRender", getRootElement(), endSubWindow ) end, 20000, 1) end end function endSubWindow( ) local width, height = guiGetSize( TopMission, false ) local x, y = guiGetPosition( TopMission, false ) if width > 0 then guiSetSize( TopMission, width - movingSpeed, height, false ) guiSetAlpha ( TopMission, (guiGetAlpha(TopMission) - 0.015) ) if width > screenWidth - x then guiSetPosition( TopMission, (screenWidth - width), y, false ) end else guiSetSize( TopMission, 0 , height, false ) removeEventHandler( "onClientRender", g_root, endSubWindow ) guiMoveToBack( TopMission ) end setTimer(function() guiSetVisible(TopMission, false) end, 2000, 1) end ----Warp-Mission--- local g_resRoot = getResourceRootElement( getThisResource( ) ) WarpMission = guiCreateWindow(400, 400, 300, 150, "Warp System | Derby Mission", false) guiSetVisible(WarpMission, false) centerWindow(WarpMission) guiMoveDownToCenter(WarpMission) Tite_Mission = guiCreateLabel(10,30, 300, 27, " To Enter The Derby Mission , Press 'Go To Mission' \n To Close The Derby Mission , Press 'Close' !", false, WarpMission) guiSetFont(Tite_Mission, "default-bold-small") WarpButton = guiCreateButton(10, 65, 300, 25, "Go To Mission", false,WarpMission) guiSetFont(WarpButton, "default-bold-small") CloseButton = guiCreateButton(10, 95, 300, 25, "Close", false,WarpMission) guiSetFont(CloseButton, "default-bold-small") PlayersLabel = guiCreateLabel(110, 125, 500, 100, "Player : ", false, WarpMission) guiLabelSetColor(PlayersLabel,255,255,255) guiSetFont(PlayersLabel, "default-bold-small") PlayerCountLabel = guiCreateLabel(155, 125, 500, 100, getElementData(g_resRoot,"PlayerCount") or "0", false, WarpMission) guiLabelSetColor(PlayerCountLabel,255,255,0) guiSetFont(PlayerCountLabel, "default-bold-small") --- addEvent("showPlayerCountDerbyMission", true) addEventHandler("showPlayerCountDerbyMission", root, function( ) guiSetText(PlayerCountLabel, getElementData(g_resRoot,"PlayerCount") or "0") end) addEvent("showWarpDerbyMission", true) addEventHandler("showWarpDerbyMission", root, function( ) guiSetVisible(WarpMission, true) guiMoveDownToCenter(WarpMission) showCursor(true) setTimer(guiSetVisible,60000,1,WarpMission,false) setTimer(showCursor,60000,1,false) end) addEventHandler("onClientGUIClick",root, function() if ( source == WarpButton ) then if getElementData(localPlayer, "LegalStatus") == "Jailed" then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. You Are Jailed !", 255, 255, 0) return end if getElementData(localPlayer, "LegalStatus") == "Arrested" then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. You Are Arrested !", 255, 255, 0) return end if getElementData(localPlayer,"Stats") == 4 then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Not Go Mission Because You Are Kidnapped !", 255, 255, 0) return end if getElementData(localPlayer,"Stats") == 5 then exports["guimessages"]:outputClient("#3399FF[Fight Mission] #FF0000You Not Go Mission Because You Are Kidnapped !", 255, 255, 0) return end if getElementData(localPlayer, "bag") then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. You Have The Bag !", 255, 255, 0) return end if getElementData(localPlayer, "ShowMarkerPoor") then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. You Have The Poor Marker !", 255, 255, 0) return end if getElementData(localPlayer, "ShopPanel") then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000Close The Panel First!", 255, 255, 0) return end if getElementDimension(localPlayer) == 55 then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. You Are Already in The Mission !", 255, 255, 0) return end if (isPedDead (localPlayer)) then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. You Are Dead !", 255, 255, 0) return end if not getPlayerTeam(localPlayer) then exports["guimessages"]:outputClient("#00F5F0[Derby Mission] #FF0000You Can't Go The Mission. Not Join To Any Team First !", 255, 255, 255) return end fadeCamera(false) setTimer(fadeCamera, 3000, 1, true) triggerServerEvent ( "WarpDerbyMission", localPlayer ) guiSetVisible(WarpMission, false) showCursor(false) elseif ( source == CloseButton ) then guiSetVisible(WarpMission, false) showCursor(false) end end) ---Mission-System---1 point
-
1 point
-
1 point
-
تكلم عدل مع شخص جاي يساعدك في موضوعك !! قال الله تعالى : ( فَبِمَا رَحْمَةٍ مِنَ اللَّهِ لِنْتَ لَهُمْ وَلَوْ كُنْتَ فَظًّا غَلِيظَ الْقَلْبِ لانْفَضُّوا مِنْ حَوْلِكَ) الآيات (159). سورة ال عمران حقك علي1 point
-
ERROR:derby\s.lua:179:exports:Call to non-running server resource (guimessages)[string"?"] WARNING: derby\s.lua:97: Bad argument @`getTimerDetails`[Expected lua-timer at argument 1 got nil] ERROR:derby\s.lua:97:attempt to perform arithmetic on a boolean value هاذ الي طلعلي1 point
-
ملف سيرفر local CarsMission = { {411}, {429}, {477}, {554}, {456}, {412}, {517}, {599}, {602}, {485}, {474}, {516}, } TableCars = {} CrtTable = {} function updateText() setElementData(getResourceRootElement( getThisResource( ) ),"PlayerCount", #CrtTable) triggerClientEvent(root, "showPlayerCountDerbyMission", root) end function AddPlayer(player, Table) if not getPlayerTable(player, CrtTable) then table.insert(Table, player) updateText() setElementData(player, "DerbyMission", true) end end function RemovePlayer(player, Table) for i, v in ipairs (Table) do if (v == player) then table.remove(Table, i) setElementData(player, "DerbyMission", false) if isElement(TableCars[player]) then destroyElement ( TableCars[player] ) end end updateText() end end function getPlayerTable(player, Table) for i, v in ipairs (Table) do if (v == player) then return true end end end addEventHandler ( "onVehicleStartExit", root, function ( player ) if getElementData(player, "DerbyMission") then cancelEvent ( ) end end ) local CrM = createMarker(1419.18518 ,-1623.82581, 13.54688+1.3, "arrow", 2, 0, 255, 0, 255) createBlip (1419.18518, -1623.82581, 13.54688, 53) function STARTDerbyMission() startTheDerbyMission = setTimer(function() triggerClientEvent(root, "showWarpDerbyMission", root) exports["guimessages"]:outputServer(root,"#3399FF[Derby Mission] #00FF00Go To Flag Black In the map", 0, 255, 255) exports["guimessages"]:outputServer(root,"#3399FF[Derby Mission] #FF0000Derby mission Will Start After 5 Minutes", 0, 255, 255) exports["guimessages"]:outputServer(root,"#3399FF[Derby Mission] #FFFF00For All Enter A Yellow Marker", 0, 255, 255) setElementData(getResourceRootElement( getThisResource( ) ),"1", "None") setElementData(getResourceRootElement( getThisResource( ) ),"1k", 0) setElementData(getResourceRootElement( getThisResource( ) ),"2", "None") setElementData(getResourceRootElement( getThisResource( ) ),"2k", 0) setElementData(getResourceRootElement( getThisResource( ) ),"3", "None") setElementData(getResourceRootElement( getThisResource( ) ),"3k", 0) setElementData(getResourceRootElement( getThisResource( ) ),"4", "None") setElementData(getResourceRootElement( getThisResource( ) ),"4k", 0) setElementData(getResourceRootElement( getThisResource( ) ),"5", "None") setElementData(getResourceRootElement( getThisResource( ) ),"5k", 0) playSoundFrontEnd (root,4) setMarkerColor(CrM,255,255,0,255) standByDerbyMission = setTimer(function() exports["guimessages"]:outputServer(root, "#3399FF[Derby Mission] #00ff00The Derby Mission Started !!", 0, 255, 255) for i, player in ipairs(CrtTable) do triggerClientEvent(player,"xDerbyMissionAction",player) setElementFrozen(TableCars[player], false) setTimer(setElementCollisionsEnabled,1000,1,TableCars[player],true) setElementFrozen(player, false) setMarkerColor(CrM,0,255,0,255) end setTimer(checkDerbyForWinner, 3000, 1, true) end, 3*60*1000, 1) end, 3*60*1000, 1) end --addEventHandler('onResourceStart', root, STARTDerbyMission) addEvent("STARTDerbyMission",true) addEventHandler("STARTDerbyMission",root,STARTDerbyMission) function getTimeLeft(Timer) if startTheDerbyMission == Timer then ms = getTimerDetails(Timer) + 300000 else ms = getTimerDetails(Timer) end local m = math.floor(ms/60000) local s = math.floor((ms-m*60000)/1000) if m < 10 then m = ""..m end if s < 10 then s = ""..s end return "("..m.." Min and "..s.." Sec)" end addCommandHandler("alltime", function(player) if isTimer(standByDerbyMission) then exports["guimessages"]:outputServer(player,"#3399FF[Derby Mission] #00FF00Time left Before Derby Missions Start : #FFFF00"..getTimeLeft(standByDerbyMission).." #00FF00!", 0, 255, 0) elseif isTimer(startTheDerbyMission) then exports["guimessages"]:outputServer(player,"#3399FF[Derby Mission] #00FF00Time left Before Derby Missions Start : #FFFF00"..getTimeLeft(startTheDerbyMission).." #00FF00!", 255, 255, 0) else end end) local DerbyPosition = { {-4614.06348 ,728.16766, 3.02076-0.2}, {-4614.06348 ,728.16766-50, 3.02076-0.2}, {-4614.06348 ,728.16766-100, 3.02076-0.2}, {-4614.06348 ,728.16766-150, 3.02076-0.2}, {-4614.06348 ,728.16766-200, 3.02076-0.2}, {-4584.36670, 727.82904 ,3.02076-0.2}, {-4584.36670, 727.82904-50 ,3.02076-0.2}, {-4584.36670, 727.82904-100 ,3.02076-0.2}, {-4584.36670, 727.82904-150 ,3.02076-0.2}, {-4584.36670, 727.82904-200 ,3.02076-0.2}, {-4555.61963, 724.96368 ,3.02076-0.2}, {-4555.61963, 724.96368-50 ,3.02076-0.2}, {-4555.61963, 724.96368-100 ,3.02076-0.2}, {-4555.61963, 724.96368-150 ,3.02076-0.2}, {-4555.61963, 724.96368-200 ,3.02076-0.2}, {-4643.72363, 728.15698, 3.02076-0.2}, {-4643.72363, 728.15698-50, 3.02076-0.2}, {-4643.72363, 728.15698-100, 3.02076-0.2}, {-4643.72363, 728.15698-150, 3.02076-0.2}, {-4643.72363, 728.15698-200, 3.02076-0.2}, {-4673.32666, 727.87604, 3.02076-0.2}, {-4673.32666, 727.87604-50, 3.02076-0.2}, {-4673.32666, 727.87604-100, 3.02076-0.2}, {-4673.32666, 727.87604-150, 3.02076-0.2}, {-4673.32666, 727.87604-200, 3.02076-0.2}, {-4703.87305, 725.87445, 3.02076-0.2}, {-4703.87305, 725.87445-50, 3.02076-0.2}, {-4703.87305, 725.87445-100, 3.02076-0.2}, {-4703.87305, 725.87445-150, 3.02076-0.2}, {-4703.87305, 725.87445-200, 3.02076-0.2} } addEventHandler("onMarkerHit", root, function(player) if getElementType(player) == "player" and not isPedInVehicle(player) and getElementDimension(player) == 0 then if isTimer(standByDerbyMission) then if source == CrM then local x, y, z = unpack(DerbyPosition[math.random(#DerbyPosition)]) local cats = unpack(CarsMission[math.random(#CarsMission)]) setElementPosition(player, x, y, z) setElementDimension(player, 55) setElementInterior(player, 0) AddPlayer(player, CrtTable) TableCars[player] = createVehicle( cats, x, y, z, 0, 0, 0 ) setElementDimension(TableCars[player], 55) setElementInterior(TableCars[player], 0) addVehicleUpgrade(TableCars[player], 1010) setVehicleDamageProof(TableCars[player],true) warpPedIntoVehicle ( player, TableCars[player] ) setElementCollisionsEnabled(TableCars[player],false) setElementFrozen(TableCars[player], true) setElementFrozen(player, true) triggerClientEvent(player,"xWaterCarsFalse",player) toggleControl ( player, "vehicle_fire", false ) toggleControl ( player, "vehicle_secondary_fire", false ) toggleControl ( player, "enter_exit", false ) end else if source == CrM then exports["guimessages"]:outputServer(player,"#3399FF[Derby Mission] #00FF00Time left Before Derby Missions Start : #FFFF00"..getTimeLeft(startTheDerbyMission).." #00FF00!", 0, 255, 255) end end end end) function WarpDerbyMission() if isTimer(standByDerbyMission) then if isPedInVehicle(source) then removePedFromVehicle(source) end local x, y, z = unpack(DerbyPosition[math.random(#DerbyPosition)]) local cats = unpack(CarsMission[math.random(#CarsMission)]) setElementPosition(source, x, y, z) setElementDimension(source, 55) setElementInterior(source, 0) AddPlayer(source, CrtTable) TableCars[source] = createVehicle( cats, x, y, z, 0, 0, 0 ) warpPedIntoVehicle ( source, TableCars[source] ) setElementDimension(TableCars[source], 55) setElementInterior(TableCars[source], 0) addVehicleUpgrade(TableCars[source], 1010) setVehicleDamageProof(TableCars[source],true) setElementCollisionsEnabled(TableCars[source],false) setElementFrozen(TableCars[source], true) setElementFrozen(source, true) triggerClientEvent(source,"xWaterCarsFalse",source) toggleControl ( source, "vehicle_fire", false ) toggleControl ( source, "vehicle_secondary_fire", false ) toggleControl ( source, "enter_exit", false ) else exports["guimessages"]:outputServer(source,"#3399FF[Derby Mission] Not Starting yet !!", 0, 255, 255) end end addEvent("WarpDerbyMission",true) addEventHandler("WarpDerbyMission",root,WarpDerbyMission) TopKill = {} function sortTop() sortedTopKill = {} for a, b in pairs(TopKill) do table.insert(sortedTopKill, {getPlayerName(a), b}) end table.sort(sortedTopKill, function(a,b) return a[2] > b[2] end) end addEventHandler("onPlayerWasted", root, function(_, killer) if getPlayerTable(source, CrtTable) then exports["guimessages"]:outputServer(root, "#3399FF[Derby Mission] #FFFF00["..getPlayerName(source).."]#FF0000 Dead In Derby Mission !!", 0, 255, 255) RemovePlayer(source, CrtTable) if isElement( TableCars[source] ) then setElementFrozen(TableCars[source], false) end setElementFrozen(source, false) if isElement( TableCars[source] ) then destroyElement ( TableCars[source] ) end toggleControl ( source, "vehicle_fire", true ) toggleControl ( source, "vehicle_secondary_fire", true ) toggleControl ( source, "enter_exit", true ) for i, player in ipairs(CrtTable) do if not ( isPedDead ( player ) ) then TopKill[player] = (TopKill[player] or 0) + 1 exports["guimessages"]:outputServer(player, "#3399FF[Derby Mission] #00FF00 You Got (+1) Point !!", 0, 255, 255) end end checkDerbyForWinner() end end );1 point
-
1 point
-
1 point
-
setVehicleHandling بعد كذا سوي التوبيك في القسم العربي https://forum.multitheftauto.com/forum/96-arabic-العربية/0 points