Leaderboard
Popular Content
Showing content with the highest reputation on 09/07/19 in all areas
-
السلام عليكم ورحمة الله تعالى وبركته اليوم رجعت لكم بموضوع جديد اول شيئ : ولان اطرح معكم وافيدكم بشيئ مميز واخذ مني وقت حيث قمت بجمع جميع الوظائف المفيدة التي تم طرحها في المنتدى او غير المنتدى في ملف واحد يجمعهم كلهم المهم مأطول عليكم اول شيء : أعتذر من @Master_MTA @#,xiRocKyz @killerProject @#x1AhMeD-09 @N3xT @KillerX @3NAD @PaiN^ @Tete omar @Booo @|Mr|-Talal07-| @WASSIm. @Default#^ @jafar @</Mr.Tn6eL> @#CroSs @iMr.WiFi..! @Abdul KariM @!#NssoR_) @Blaawee @iPrestege @#DRAGON!FIRE @[email protected]~#@LoOs@TAPL@Me[Z]oO@^iiEcoo'x_)@#[email protected]@#BrosS @ وأيضا كل من قام بدعم المحتوى العربي بالنشر لان نسيت احط حقوقهم المهم الي يبي احط حقوقه في أي وظيفة يكلمني او معه فكشن يبني اضيفه للمكتبة يروح على الرابط في GITHUB = https://github.com/MrPoper/Useful-World-Lua/projects/1 يضيف فكنشن حقه و يتبع و الطريقة الموجودة اسفل هذا الكلام و يغير Builder Name = your name https://pages.github.com/ = احد روابط مواقع التواصل الاجتماعي (المنتدى ’ فيس ’ وتس ’ ديسكور ...) -__**Function Info :**__ * info * -__**Function SYNTAX:**__ > Code HERE < - __**Function SOURCE CODE:**__ > Code HERE < - __**Function EXAMPLE :**__ > Code HERE < - __**Function TYPE :**__ - [ ] HELP - [ ] CONVERT - [ ] ELEMENT This Function BUILD By [Builder Name](https://pages.github.com/). المهم هاذا رابط تحميل كل الوظائف المفيدة: USEFUL FUCTION : 200+ LINES : 6500+ RECORD TIME : [12 November 2012] - [26 JUNE 2019] https://github.com/MrPoper/Useful-World-Lua/projects/1 ?لا تنسى الصلاة على سيدنا محمد صلى الله عليه وسلم1 point
-
السلام عليكم و رحمه الله و بركاته اليوم حبيت اسوي مود سهل و خفيف بيساعد المبرمجين في البرمجه بشكل كبير طبعا كنت معتزل و لي سنه ما نزلت شي جديد فحبيت اسوي خير شويه المود عباره عن نظام صلاحيات للحسابات وش فايدته .... ؟ مثلا عندك لوحه و تبي تخليها لكم لاعب فقط تقدر تستعمل السكربت عشان تخصص اللوحه لحسابتهم فقط او مثلا عندك لوحه و بها ازرار كتير و مثلا تبي زر يكون خاص للاعب بكل سهوله تقدر تستعمل السكربت السكربت هدفه توفير الوقت + طبعا عدم استخدام طرق التحققات الشائعه بين المبرمجين الي احيانا تسبب مشاكل للسيرفر --------------------------------------------------------------------------------------------------------- Export Functions / الوظائف الي تستطيع استدعائها Server Side : createPremission deletePremission addPremissionToAccount removePremissionFromAccount Client/Server ( Shared ) : getAllPremissions isAccountHasPremission getAccountsWithPremission getPremissionTable isPremissionExist Client Side : getClientAccount ------------------------------------------------------------------------------------- شرح الوظائف : createPremission تستخدم هذه الوظيفه لعمل صلاحيه جديده Usage : createPremission ( premissionName ) premissionName = اسم الصلاحيه الي تباها deletePremission تستخدم هذه الوظيفه في مسح صلاحيه موجوده من قبل Usage : deletePremission ( premissionName ) premissionName = اسم الصلاحيه addPremissionToAccount تستخدم هذه الوظيفه لاعطاء صلاحيه للحسابات .. Usage : addPremissionToAccount ( AccountName , Permission ) AccountName = اسم الحساب Permission = الصلاحيه removePremissionFromAccount تستخدم هذه الوظيفه في مسح صلاحيه من حساب Usage : removePremissionFromAccount ( Account , Permission ) Account = اسم الحساب Permission = الصلاحيه getAllPremissions تجيب لك الصلاحيات الموجوده Usage : getAllPremissions () الوظيفه ترجع لك جدول فيه الصلاحيات الي موجوده isAccountHasPremission تتحقق اذا كان الحساب عنده الخاصيه او لا Usage : isAccountHasPremission ( AccountName , Permission ) ترجع القيمه boolean getAccountsWithPremission تجيب لك الحسابات الي عندها صلاحيه محدده Usage : getAccountsWithPremission ( Permission ) Permission = اسم الصلاحيه ترجع لك جدول فيه اسماء الحسابات الي عندها الصلاحيه ذي getPremissionTable تجيب لك الجدول الكامل للصلاحيات الجدول كالتالي : Permissions = { PermissionName = { Accounts ...... }, etc........... } isPremissionExist تتحقق لك اذا كان في صلاحيه بالأسم الي انت مسويه من قبل او لا Usage : isPremissionExist ( PermissionName ) getClientAccount تجيب لك اسم حساب اللاعب في الكلينت سايد Usage : getClientAccount ( Player ) لو اللاعب مو مسجل بيرجع لك قيمه guest -------------------------------------------------------------------------------------------- طبعا المود يحفظ الصلاحيات لو وقف المود و اشتغل مره تانيه .. *NOTE : لسا ملاحظ اني كتبت كلمه Permission غلط معلش مخدتش بالي رابط التحميل : PERMISSIONS SYSTEM Ver: 1.0.0 المود مو مشفر للي حابب يتعلم كدا كدا المود مخصص للمبرمجين :- UPCOMING SCRIPT / السكربت القادم Resources Manager ( V3 )1 point
-
هو جميل وليس جمال gmail إلى ابطال الديجتال نود افادتكم علما بأن نطق كلمة gmail = جميل gamil = جمال لذلك وجب التنويه1 point
-
ايوة اعرف بس كنت احسب ان لو استخدم addDebugHook واستخدمت return 'skip' انه يكنسل بس تأكدت , يعطيك العافية1 point
-
1 point
-
1 point
-
JS object format types, which is more or less the same as JSON. Just it is not a string but an entity. Which is a way for myself to separate array structured tables from tables with mixed keys. Might be good or bad practice, I myself to be honest do not know. @majqq If you need confirmation, then the best way is to test it yourself. local newTable_array = {} local newTable_object = {} local loops = 1000 for i = 1, 1000 do newTable_array[i] = true newTable_object[i .. ""] = true end do local timeNow = getTickCount () for _ = 1, loops do for i=1, #newTable_array do local value = newTable_array[i] end end outputChatBox(getTickCount () - timeNow) end do local timeNow = getTickCount () for _ = 1, loops do for key, value in pairs(newTable_array) do end end outputChatBox(getTickCount () - timeNow) end do local timeNow = getTickCount () for _ = 1, loops do for key, value in ipairs(newTable_array) do end end outputChatBox(getTickCount () - timeNow) end do local timeNow = getTickCount () for _ = 1, loops do for key, value in pairs(newTable_object) do end end outputChatBox(getTickCount () - timeNow) end1 point
-
@HassoN ye it's work Thank you! @HassoN what's about this green target ? I mean when the right mouse button selects the player a green mark appears. Can this be removed?1 point
-
I tried this by myself and it's working. -- client local drawDistance = 15 g_StreamedInPlayers = {} function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix() for k, player in ipairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then do local vx, vy, vz = getPedBonePosition(player, 8) local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz) if getElementData(player, "invisiblePlayer") then return false end if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3) if x and y then local name = getPlayerName(player) local id = getElementData ( player, "ID", s_id ) or "0" local w = dxGetTextWidth(name, 1, "default-bold") local h = dxGetFontHeight(1, "default-bold") local fname = getElementData(player,"fname") or getPlayerName(player) local sname = getElementData(player,"sname") or "S" local hp = getElementData(player,"lastDamage") or "100" dxDrawText("#FFFFFF"..fname.." "..sname.."#1E90FF ["..id.."]", x - 2 - w / 4, y - 0 - h - 12, w, h, tocolor(255, 0, 0), 1, "default-bold","left","top",false,false,false,true) local health = getElementHealth(player) local armour = getPedArmor(player) if health > 0 then local rate = 500 / getPedStat(player, 24) drawHPBar(x, y - 6, health * rate, dist) if armour > 0 then drawArmourBar(x, y - 12, armour, dist) end end end end end else table.remove(g_StreamedInPlayers, k) end end end addEventHandler("onClientRender", root, onClientRender) function onClientElementStreamIn() if getElementType(source) == "player" and source ~= getLocalPlayer() then setPlayerNametagShowing(source, false) table.insert(g_StreamedInPlayers, source) end end addEventHandler("onClientElementStreamIn", root, onClientElementStreamIn) function onClientResourceStart(startedResource) visibleTick = getTickCount() counter = 0 normalhealthbar = false local players = getElementsByType("player") for k, v in ipairs(players) do if isElementStreamedIn(v) and v ~= getLocalPlayer() then setPlayerNametagShowing(v, false) table.insert(g_StreamedInPlayers, v) end end end addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart) -- server function toggleInvis( source ) if getElementAlpha(source) == 255 then setElementAlpha(source, 0) setElementData(source, "invisiblePlayer", true) else setElementAlpha(source, 255) setElementData(source, "invisiblePlayer", nil) end end addCommandHandler ( "invisible", toggleInvis ) The code is a huge mess tho, you could order it a little bit more.1 point
-
Try this local drawDistance = 15 g_StreamedInPlayers = {} local blockedPlayers = {} function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix() for k, player in ipairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then do local vx, vy, vz = getPedBonePosition(player, 8) local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz) if blockedPlayers[player] then return false end if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3) if x and y then local name = getPlayerName(player) local id = getElementData ( player, "ID", s_id ) local w = dxGetTextWidth(name, 1, "default-bold") local h = dxGetFontHeight(1, "default-bold") local fname = getElementData(player,"fname") local sname = getElementData(player,"sname") local hp = getElementData(player,"lastDamage") dxDrawText("#FFFFFF"..fname.." "..sname.."#1E90FF ["..id.."]", x - 2 - w / 4, y - 0 - h - 12, w, h, tocolor(255, 0, 0), 1, "default-bold","left","top",false,false,false,true) local health = getElementHealth(player) local armour = getPedArmor(player) if health > 0 then local rate = 500 / getPedStat(player, 24) drawHPBar(x, y - 6, health * rate, dist) if armour > 0 then drawArmourBar(x, y - 12, armour, dist) end end end end end else table.remove(g_StreamedInPlayers, k) end end end addEventHandler("onClientRender", root, onClientRender) function invis() blockedPlayers[source] = true end addEvent( "invis", true ) addEventHandler( "invis", root, invis ) function invisoff() blockedPlayers[source] = nil end addEvent( "invisoff", true ) addEventHandler( "invisoff", root, invisoff) function onClientElementStreamIn() if getElementType(source) == "player" and source ~= getLocalPlayer() then setPlayerNametagShowing(source, false) table.insert(g_StreamedInPlayers, source) end end addEventHandler("onClientElementStreamIn", root, onClientElementStreamIn) function onClientResourceStart(startedResource) visibleTick = getTickCount() counter = 0 normalhealthbar = false local players = getElementsByType("player") for k, v in ipairs(players) do if isElementStreamedIn(v) and v ~= getLocalPlayer() then setPlayerNametagShowing(v, false) table.insert(g_StreamedInPlayers, v) end end end addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart) -- server iv = 0 function toggleInvis( source ) if iv == 0 then iv = 1 setElementAlpha(source, 0) triggerClientEvent(source, "invis", source) else iv = 0 setElementAlpha(source, 255) triggerClientEvent(source, "invisoff", source) end end addCommandHandler ( "invisible", toggleInvis ) btw you should use ipairs with tables that have numbers as index. (I modified it for you)1 point
-
1 point
-
Parece ser problema de sua internet ser lenta demais e não consegue fazer download dos arquivos. Mas não tenho certeza, também pode ser conflito com seu anti-vírus.1 point
-
Se refere a deixar uma tela personalizada durante o download, é isso?1 point
-
This should work. -- client local drawDistance = 15 g_StreamedInPlayers = {} function onClientRender() local cx, cy, cz, lx, ly, lz = getCameraMatrix() for k, player in pairs(g_StreamedInPlayers) do if isElement(player) and isElementStreamedIn(player) then do local vx, vy, vz = getPedBonePosition(player, 8) local dist = getDistanceBetweenPoints3D(cx, cy, cz, vx, vy, vz) if dist < drawDistance and isLineOfSightClear(cx, cy, cz, vx, vy, vz, true, false, false) then local x, y = getScreenFromWorldPosition(vx, vy, vz + 0.3) if x and y then local name = getPlayerName(player) local id = getElementData ( player, "ID", s_id ) local w = dxGetTextWidth(name, 1, "default-bold") local h = dxGetFontHeight(1, "default-bold") local fname = getElementData(player,"fname") local sname = getElementData(player,"sname") local hp = getElementData(player,"lastDamage") dxDrawText("#FFFFFF"..fname.." "..sname.."#1E90FF ["..id.."]", x - 2 - w / 4, y - 0 - h - 12, w, h, tocolor(255, 0, 0), 1, "default-bold","left","top",false,false,false,true) local health = getElementHealth(player) local armour = getPedArmor(player) if health > 0 then local rate = 500 / getPedStat(player, 24) drawHPBar(x, y - 6, health * rate, dist) if armour > 0 then drawArmourBar(x, y - 12, armour, dist) end end end end end else table.remove(g_StreamedInPlayers, k) end end end addEventHandler("onClientRender", root, onClientRender) function invis() for k, player in pairs(g_StreamedInPlayers) do if player == source then table.remove(g_StreamedInPlayers, k) end end end addEvent( "invis", true ) addEventHandler( "invis", root, invis ) function invisoff() table.insert(g_StreamedInPlayers, source) end addEvent( "invisoff", true ) addEventHandler( "invisoff", root, invisoff) function onClientElementStreamIn() if getElementType(source) == "player" and source ~= getLocalPlayer() then setPlayerNametagShowing(source, false) table.insert(g_StreamedInPlayers, source) end end addEventHandler("onClientElementStreamIn", root, onClientElementStreamIn) function onClientResourceStart(startedResource) visibleTick = getTickCount() counter = 0 normalhealthbar = false local players = getElementsByType("player") for k, v in pairs(players) do if isElementStreamedIn(v) and v ~= getLocalPlayer() then setPlayerNametagShowing(v, false) table.insert(g_StreamedInPlayers, v) end end end addEventHandler("onClientResourceStart", resourceRoot, onClientResourceStart) -- server iv = 0 function toggleInvis( source ) if iv == 0 then iv = 1 setElementAlpha(source, 0) triggerClientEvent(source, "invis", source) else iv = 0 setElementAlpha(source, 255) triggerClientEvent(source, "invisoff", source) end end addCommandHandler ( "invisible", toggleInvis )1 point
-
Intentá esto --CLIENT addEventHandler("onClientRender", root, function() -- Con esta función se tomará el interior del jugador constantemente. local int = getElementInterior(localPlayer) -- Se toma el interior del jugador. setElementData( localPlayer, "Interior", int ) -- El dato "Interior" guarda en que interior se encuentra el jugador. end ) addEventHandler("onClientElementDataChange", root, function(key,oV,nV)-- Esta función se iniciara cuando se detecte un cambio de interior por el jugador. if key == "Interior" then -- Detecta si el dato que cambia es "Interior". triggerServerEvent( "onPlayerInteriorWarped", source, oV, nV ) -- Inicia un evento enviado al lado del servidor donde source es el jugador que cambió de interior, oV es el antiguo interior y nV es el nuevo interior. end end ) --SERVER addEvent("onPlayerInteriorWarped", true) -- Añade el evento 'onPlayerInteriorWarped' al lado del servidor. addEventHandler("onPlayerInteriorWarped", root, function(oldInterior,newInterior) -- Tu función. if oldInterior == 0 then toggleControl( source, "fire", false ) elseif newInterior == 0 then toggleControl( source, "fire", true ) end end ) Si no funciona es porque capaz tenés algo mal en el meta porque el que te pasaron estaba perfecto.1 point
-
1 point
-
Se você utiliza vários mods com excesso de polígonos consequentemente você terá vários MB's no servidor. Com relação ao download personalizado eu não sei se foi isso que você quis dizer, mas você pode fazer um resource para baixar os mods (TXD/DFF/COL) separadamente dos scripts e em segundo plano, a função downloadFile faz isso. Aqui já tem alguns destes resources que faz isso: https://community.multitheftauto.com/index.php?p=resources&s=list&name=downloader&descr=&category=1 point
-
1 point
-
السلام عليكم ورحمة الله وبركاتة تم افتتاح شبكة تواصل اجتماعي ءامنة ومحمية ومليئة بأضافات مميزة كما اعلن عن توثيق جميع حسابات المنتدي كهدية مني للأنضمام للشبكة فقط قم بمراسلتي هناك اسم المستخدم تبعي https://worldsocial.net/1MohamedMaher رابط الموقع https://worldsocial.net/1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Conversions like this does take a good bit of time to finish, and so I would maybe consider including a reward of sorts. Anyway, please shoot me a PM with some screenshots and description of what you're dealing with. I might be interested.0 points
-
0 points
-
0 points