Leaderboard
Popular Content
Showing content with the highest reputation on 01/07/18 in all areas
-
هههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههه اكتفي بالصمت#2 points
-
يشتري جهاز كامل متكامل عشان يشغل هذي اللعبة ؟ المفروض تسأله النسخه اللي معه اصليه من سيتم أو مكركه قبل مايغير جهازه2 points
-
addEvent("Ranks:Buy1", true) addEventHandler("Ranks:Buy1", root, function() local Le3bA = getPlayerMoney(source) if Le3bA >= 250000 then local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local accountName = getAccountName(account) if not isObjectInACLGroup("user."..accountName, aclGetGroup("VIP")) then takePlayerMoney(source, 250000) aclGroupAddObject(aclGetGroup("VIP"), "user."..accountName) outputChatBox( "Account "..accountName.." succesfully added to the VIP group", source) outputChatBox("You're in VIP group Now.", source, 255, 0, 0, true) setTimer( function() aclGroupRemoveObject(aclGetGroup("VIP"),"user."..accountName) end, 60000*5,1) else outputChatBox("You're already in VIP group.", source, 255, 0, 0, true) end else outputChatBox("You're not logged in.", source, 255, 0, 0, true) end else outputChatBox("You don't have $250000 to buy VIP", source, 255, 0, 0, true) end end ) يسحب رتبه بعد ٥ دقايق2 points
-
السلام عليكم صممت لكم مود بسيط وهو مود الرواتب اكيد م في احد م يعرفه في سرفر طاره الكل يستلم الراتب قبل الخروج من السرفر هاام : يجب تشغيل الترجمة والشرح رابط التحميل في وصف المقطع1 point
-
Try this -- client explosiveWeaponIDS = { [ 51 ] = true, [ 19 ] = true, [ 50 ] = true, } function check(attacker, weapon) local theVehicle = getPedOccupiedVehicle ( localPlayer ) if theVehicle then local id = getElementModel ( theVehicle ) if id == 520 and explosiveWeaponIDS[weapon] then triggerServerEvent ( "onVehicleKill", localPlayer, attacker, weapon ) end end end addEventHandler ( "onClientVehicleDamage", root, check ) -- server function killPlaya(attacker,weapon) local hisVehicle = getPedOccupiedVehicle(source) killPed(source, attacker, weapon) blowVehicle(hisVehicle) end addEvent( "onVehicleKill", true ) addEventHandler( "onVehicleKill", root, killPlaya )1 point
-
I would gladly provide you a working script but unfortunately I wouldn't be able to test it as a second player is required for that. All I can say is that you need to make a if statement that includes your table and would make the event trigger when a player is piloting an hydra and gets hit by one of the 3 explosive id from the table which would then trigger the kill function.1 point
-
From my understanding, your script basically kills the attacker when he hits an hydra because you set the triggerServerEvent element to attacker, whereas it should be source because the event is triggered when a vehicle gets damaged. By changing your "attacker" at line 13 to "source", the event should trigger for the person being hit, and not the opposite. But what you should also fix is that by the way your script is, it triggers by any type of damage, as you don't use the explosiveWeaponIDS table at all.1 point
-
Isso é normal quando você coloca muitos objetos próximos (sobrecarrega o client) e também quando você remove muitos objetos originais do mapa próximos (objetos removidos também sobrecarregam) Talvez isso resolva: setOcclusionsEnabled(false)1 point
-
There is no such weapon ID in MTA. M4 ID would be 31.1 point
-
Use essa loja de carros: shopcar-system Se voltar a ocorrer esse problema, então é outro resource que está com problema.1 point
-
1 point
-
Note: The client side version of getPlayerSerial has been deprecated as it can return the wrong value for some players, and is potentially insecure. The following article assumes that the function is serverside only.1 point
-
يعني الحين انا فاتح الموضوع حقه واكتب الكود الاقيك مساعده , ض2 المهم بالتوفيق يا كيلر ولا يهمك المهم انك افدته بشئ1 point
-
1 point
-
-- حط السيريالات هنا local Serials = { ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"] = true, ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"] = true ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"] = true, ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"] = true ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"] = true, ["XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"] = true } GUIEditor = { button = {}, window = {}, edit = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 293) / 2, (screenH - 113) / 2, 293, 113, "توزيع السلحة", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.edit[1] = guiCreateEdit(9, 31, 182, 32, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(191, 32, 91, 35, "اعطاء سلاح", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF12FE00") GUIEditor.button[2] = guiCreateButton(100, 67, 91, 35, "اسلحة", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF12FE00") GUIEditor.button[3] = guiCreateButton(9, 67, 91, 35, "اغلاق", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF12FE00") GUIEditor.button[4] = guiCreateButton(192, 67, 91, 35, "اعطاء الكل اسلحة", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[4], "default-bold-small") guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF12FE00") addEventHandler("onClientGUIClick",root,function () if source == GUIEditor.button[1] then local houres = guiGetText(GUIEditor.edit[1]) triggerServerEvent("Give;Houres",localPlayer,houres) elseif source == GUIEditor.button[2] then triggerServerEvent("Enable;Houres",localPlayer,'true') elseif source == GUIEditor.button[4] then triggerServerEvent("Enable;Houres",localPlayer,'false') elseif source == GUIEditor.button[3] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end) guiSetVisible (GUIEditor.window[1], false ) function OpenWin() if Serials[getPlayerSerial(localPlayer)] then if guiGetVisible(GUIEditor.window[1]) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) guiSetInputEnabled(false) else guiSetVisible(GUIEditor.window[1],true) showCursor(true) guiSetInputEnabled(true) end end end bindKey("F4", "down", OpenWin) الوحة تفتح و تسكر باف41 point
-
k my friend I'll do my job here. Thanks for your help. Yeah, bindkey seems a bad idea for this.1 point
-
I am not sure, I hardly needed them. Just run the example of the wiki, to figure our what you need. https://wiki.multitheftauto.com/wiki/GetPedTask function displayMyTask () local x,y = 100,200 for k=0,4 do local a,b,c,d = getPedTask ( getLocalPlayer(), "primary", k ) dxDrawText ( "Primary task #"..k.." is "..tostring(a).." -> "..tostring(b).." -> "..tostring(c).." -> "..tostring(d).." -> ", x, y ) y = y + 15 end y = y + 15 for k=0,5 do local a,b,c,d = getPedTask ( getLocalPlayer(), "secondary", k ) dxDrawText ( "Secondary task #"..k.." is "..tostring(a).." -> "..tostring(b).." -> "..tostring(c).." -> "..tostring(d).." -> ", x, y ) y = y + 15 end end addEventHandler ( "onClientRender", root, displayMyTask ) (x and y are screen positions) (a, b, c, d are the task information) You can also use bindkey: https://wiki.multitheftauto.com/wiki/BindKey But that doesn't tell you if a ped is actually doing the animation/task. bindKey("fire", "down", function () end)1 point
-
1 point
-
1 point
-
You mean position. Yeah, so he said the same. Its just much faster to write something in OOP than in PP, and its even easier to read. (In case you dont use spaces everywhere, because that makes no sense, and you follow the Lua style guide.) An own set of functions, variables, and such are called a class. But to answer your question: As I said, variables are just memory references, they are basically pointers, that point to a memory block, whatever. So basically, its the same like using getLocalPlayer():getHealth() So it really doesnt matter if the pointer to the mem. block is in the 'source' variable, or 'driftyz' variable, it means really nothing to the Lua VM. Yes, the player needs to be defined, and it needs to be an element that has the METHOD you want to call. Otherwise, if its nil Lua would throw an error like: "Attempt to index a nil value" Or if the method in that class doesnt exists(for ex.: you want to call setPosition() on a texture element) "Attempt to call a method 'setPosition' (something goes here, but idk what)" And so on.1 point
-
addEventHandler ( "onPlayerQuit" , root , function ( ) if ( getPedOccupiedVehicle ( source ) and getVehicleController(getPedOccupiedVehicle(source)) == source ) then destroyElement ( getPedOccupiedVehicle ( source ) ) end end )1 point
-
1 point
-
1 point
-
No início da função que renderiza o seu HUD ou radar, coloque uma condição de restrição que se o jogador possuir tal data, não renderiza eles. Ex: function renderHUD () if getElementData (localPlayer, "cinematic") then return end -- DxDraw... elementos que criam o HUD. end addEventHandler ("onClientRender", getRootElement(), renderHUD) Nesse exemplo acima, se o jogador possuir a data "cinematic", o HUD não será renderizado (não aparecerá). Depois que o jogador sair do painel de login, basta remover essa data ou colocá-la como false, permitindo que o HUD volte a ser renderizado. setElementData (localPlayer, "cinematic", false)1 point
-
طيب وين التايمر هوة قال بدو لما يعطيعه الزر رتبة يبيه لمدة معينة وينسحب منه الرتبة + الكود لازمني لي كمان وشكرا ذذ1 point
-
1 point
-
1 point
-
تعديل, الكيبورد مدري وش فيه اذا نسخت شيء يضيف عليه حروف addEventHandler ('onClientGUIClick', root, function ( ) if source == btn.vip then guiSetVisible( wnd1, false ) showCursor( false ) executeCommandHandler("VIP") end end )1 point
-
1 point
-
لو بغيت الصراحه مستغرب كيف مسوي مود كذا وقاعد تسوي طلبات بموقع البرمجه اسهل من الموجود بالمود ذا بكثير باختصار انت زارف حقوق خخ1 point
-
I'm sell this unique soft. This program is for encryption, designed to protect your models on the server. This program excludes artifacts and memory overflow when using RAW-LOADING. * Benefits: 1. Minimally increases the weight of the file. 2. Everything works very quickly. 3. Great reliability. 4. Free updates. 5. A large number of settings. 6. Free help. 7. The password to the files, personally yours and not transmitted anywhere. Price: 12$ [FOREVER] Soon I will make a video on the use of the program.1 point
-
DownloadFile وظيفة تحميل ملف مرفوع على الانترنت Syntax : bool DownloadFile ( string Link , string FileName ) Required Arguments Link : رابط الملف المراد تحميله يشترط ان يكون رابط مباشر FileName : اسم الملف عندما يتحمل وتقدر تحط مسار واسم الملف ولازم تحط صيغة الملف استخدام الفنكشن يكون بجهة سيرفر سايد والا مابيشتغل source Code : function DownloadFile ( Link , FileName ) assert ( type ( Link ) == "string" , "Bad Argument At Argument #1 Link Moust String" ) assert ( type ( FileName ) == "string" , "Bad Argument At Argument #1 FileName Moust String" ) fetchRemote( Link , function ( Result ) if Result == "ERROR" then error ( "Can't Calling The Link" ) return false end if fileExists ( FileName ) then error ( "the file is already exists" ) return false end local theFile = fileCreate ( FileName ) if ( not theFile ) then return false end fileWrite ( theFile , Result ) fileClose ( theFile ) return true end ) end ex 1 DownloadFile ( "https://i.imgur.com/gdclMbe.png" , "mtaLogo.png" ) DownloadFile ( "https://i.imgur.com/gdclMbe.png" , ":resourceName/mtaLogo.png" ) ملاحظة : اذا ماحمل معك الملف حاول ترفع الملف الي تبيه على موقع ثاني ويكون مباشر Author : Abdul KariM اتمنى ان الفنكشن اعجبكم , والسلام عليكم1 point
-
الواحد ندم انو في يوم قرر يعمل سيرفر دلوقتي انا بايع لناس رتب في السيرفر ومرغوم اني افتحه ومعيش فلوس ارجعلهم فلوسهم اصلآ1 point
-
0 points
-
مدري صح او غلط بس جربء setElementData(resourceRoot,"map","no") setElementData(resourceRoot,"winMoney","0") addEventHandler("onPlayerChat",getRootElement(),function(message) if tostring(message) == "ديربي" and checkDuel(source) == "prestart" and ( not checkExistPlrOnDuel(source) ) then if getAccountData(getPlayerAccount(source),'forzaban') then if string.find(text,"ديربي") then return end end online = countPlayersOnDerby() if tonumber(online)+1 < 15 then setData(source,"onCrossMap","yes") setD(source) spawnOnMap(source) else outputChatBox("#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 لم يتبق مكان في الفورزا الرجاء الانتظار",source,0,255,0,true) end end end) function checkDuel(p) if tostring(getElementData(resourceRoot,"map")) == "yes" then --outputChatBox("#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 ",p,255,255,0,true) elseif tostring(getElementData(resourceRoot,"map")) == "no" then outputChatBox("#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 الرجاء الانتظار حتى يبدأ الفورزا",p,255,255,0,true) end return tostring(getElementData(resourceRoot,"map")) end function checkExistPlrOnDuel(p) per = getElementData(p,"onCrossMap") if tostring(per) == "yes" then return true else return false end end function setData(element,key,vlr) setElementData(element,key,vlr) end function setD(element) setElementDimension(element,40) end function spawnOnMap(p) count = countPlayersOnDerby() spawned = "no" spawned = "yes" setElementDimension(source,40) setElementFrozen(source,true) setElementData(source,"creatorForza","yes") break if spawned == "no" then randomS = math.random("1","32") setElementDimension( source, 40 ) setElementFrozen( source, true ) setElementData( source, "creatorForza", "yes" ) break end toggleControl(p,"enter_exit", false ) setCameraTarget(p,p) end function countPlayersOnDerby() c = -1 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end return tonumber(c) end function eventCheck () if checkExistPlrOnDuel(source) then toggleControl(source,"enter_exit",true ) setData(source,"onCrossMap","no") checkEnd() end end addEventHandler("onPlayerWasted",getRootElement(),eventCheck) addEventHandler("onPlayerQuit",getRootElement(),eventCheck) addEventHandler("onPlayerJoin",getRootElement(),function() exports.killmessages:outputMessage("",source,255,255,0,true) setData(source,"onCrossMap","no") end) for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end function checkEnd() c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 winner = p end end if tonumber(c) == 1 then givePlayerMoney(winner,tonumber(getElementData(resourceRoot,"winMoney"))) n = string.gsub(getPlayerName(winner), "#%x%x%x%x%x%x", "") exports.guimessages:outputServer( root,"#ff0000****************************************************",255,255,0,true) exports.guimessages:outputServer( root," ",255,255,0,true) exports.guimessages:outputServer( root,"#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 في مهمة الفورزا" .. n .. "لقد فاز اللاعب ",root,255,255,0,true) exports.guimessages:outputServer( root," ",255,255,0,true) exports.guimessages:outputServer( root,"#ff0000****************************************************",root,255,255,0,true) setElementData(resourceRoot,"map","no") endDerby() setTimer(newDuel,1000,1) end end function newDuel() for i,p in pairs(getElementsByType("player"))do setData(p,"onCrossMap","no") end setElementData(resourceRoot,"map","prestart") exports.guimessages:outputServer( root,"#ff0000****************************************************",255,255,0,true) exports.guimessages:outputServer( root," ",255,255,0,true) exports.guimessages:outputServer( root,"#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 لدخول الفورزا اكتب في الشات دخول",255,255,0,true) exports.guimessages:outputServer( root," ",255,255,0,true) exports.guimessages:outputServer( root,"#ff0000****************************************************",255,255,0,true) RMoney = math.random("50000","300000") setElementData(resourceRoot,"winMoney",tonumber(RMoney)) setTimer(checkPlrs,60000,1) end function checkPlrs () c = 0 for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then c = c+1 end end if tonumber(c) > 1 then setElementData(resourceRoot,"map","yes") for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then setElementCollisionsEnabled(getPedOccupiedVehicle(p),true) outputChatBox("#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 لقد بدأ الفورزا يمكنكم الانطلاق",p,0,255,0,true) setElementFrozen(getPedOccupiedVehicle(p),false) end end else endDerby() setElementData(resourceRoot,"map","no") exports.guimessages:outputServer( root,"#ff0000-[ #ffffffForzaMission #ff0000]-:#FF0000 لم يبدأ الفورزا لعدم توفر لاعبين",255,255,0,true) setTimer(newDuel,60000,1) end end setTimer(newDuel,60000,1) function onStartLoadSpawns () file = fileOpen("map.map") localFile = fileOpen("map.xml") fileWrite(localFile,"") data = fileRead(file,999999) fileWrite(localFile,data) fileClose(localFile) xml = xmlLoadFile("map.xml") c = 0 for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "spawnpoint" then c = c+1 end end for i,data in pairs(xmlNodeGetChildren(xml)) do if xmlNodeGetName(data) == "object" then m,xx,yy,zz,rxx,ryy,rzz = xmlNodeGetAttribute(data,"model"),xmlNodeGetAttribute(data,"posX"),xmlNodeGetAttribute(data,"posY"),xmlNodeGetAttribute(data,"posZ"),xmlNodeGetAttribute(data,"rotX"),xmlNodeGetAttribute(data,"rotY"),xmlNodeGetAttribute(data,"rotZ") object = createObject(m,xx,yy,zz,rxx,ryy,rzz) setElementDimension(object,40) end end end setTimer(onStartLoadSpawns,3000,1) function endDerby() for i,p in pairs(getElementsByType("player"))do if checkExistPlrOnDuel(p) then killPed(p) end end for i,v in pairs(getElementsByType("vehicle"))do if getElementData(v,"creatorDerby") then destroyElement(v) end end end setTimer(function() for i,p in pairs(getElementsByType("player"))do sea(p) resetHan(p) checkVeh(p) checkModel(p) end end,1000,0) outputChatBox("",getRootElement(),255,255,0,true) function sea(p) if checkExistPlrOnDuel(p) then x,y,z = getElementPosition(p) if tonumber(z) <= 0 then killPed(p) end end end function checkVeh(p) if (tonumber(getElementDimension(p)) == 40) and not (isPedInVehicle(p))then killPed(p) end end function resetHan(p) if checkExistPlrOnDuel(p) then setVehicleHandling (getPedOccupiedVehicle(p), true ) end end function checkModel(p) if checkExistPlrOnDuel(p) and isPedInVehicle(p) then if tonumber(getElementModel(getPedOccupiedVehicle(p))) ~= 502 then killPed(p) end end end0 points
-
0 points