Jump to content

Rockyz

Members
  • Posts

    1,862
  • Joined

  • Days Won

    8

Everything posted by Rockyz

  1. maybe something like this ? ar = {} s = '{100}Hello, world!{end}{45}How are you?{end}' for k, v in string.gmatch(s, '{(%d+)}(.-){end}') do table.insert(ar, {k, v}) end for k,v in ipairs(ar) do outputChatBox('K: ' .. k .. ' V1: ' ..v[1] .. ' V2: ' .. v[2]) end
  2. الوظيفة ترجع جدول, لازم تسوي لوب
  3. طيب وش المشكلة ؟
  4. سويت لك فنكشن مفيد function getPlayersFromData(dataName) if type(dataName) == 'string' then local players = {} for _, player in ipairs(getElementsByType('player')) do if getElementData(player, dataName) then players[#players+1] = player end end end return players end اذا تبي تجيب عدد اللاعبين الي عندهم الداتا #getPlayersFromData('dataName')
  5. استخدم كودي
  6. @Master_MTA وش وضع توقيعك '-'
  7. الله يهديك الموضوع صار له 8 ايام تقريبا وهو يقدر يحط التحقق مو صعبة واصلا حتى لو ما حط هو غلطان اذا حط ارقمنت غلط
  8. مادري ليش احسك تقصدني على هالمشاركة اذا كنت فعلاً تقصدني انا قلت لك غلط لكن يمكن مثلا انا اعرف ان هذا الشي غلط, ولكن انا ما اعرف اشرح الغلط هذا لشخص غيري على العموم, بالتوفيق
  9. مايصير يسوي لما يشتغل السكربت ولا لما اللاعب يسجل بس لازم لما تنضاف رتبة و تنحذف من لاعب ايضا ..
  10. بديتون في البنت قبل الولد ليه انفصام ؟ لكن ابداع, بالتوفيق لكم
  11. فهمت غلط انت انا اقصد لاتصنف الناس هذا افضل من هذا لأنك في النهاية ماتعرف مستواه xiRocK#8488
  12. شكراً, ولكن انت ماتعرف اذا انا خبير ولا لا عشان تقول ذا افضل من ذا ولا العكس
  13. وضح اكثر ؟
  14. @TheOtherSide طريقتك هذي غلط ايضاً وبالنسبة لصاحب الموضوع عدل كودي في السطر 23 جهة السيرفر خله كذا : addDebugHook('postFunction', aclHook, {'aclGroupAddObject', 'aclGroupRemoveObject'})
  15. https://community.multitheftauto.com/index.php?p=resources&s=details&id=1224
  16. غلط, بسبب ان هذي الوظيفة تنفذ الفنكشن المكتوب يعني مابترجع القيمة الصحيحة مادري اذا فهمتني
  17. سويت لك فنكشن وماجربته, من المفترض انه يشتغل: Server side : function playerACL() if eventName == 'onResourceStart' then for _, player in ipairs(getElementsByType('player')) do updatePlayerACL(player) end elseif eventName == 'onPlayerLogin' or eventName == 'onPlayerLogout' then updatePlayerACL(source) end end addEventHandler('onResourceStart', root, playerACL) addEventHandler('onPlayerLogin', root, playerACL) function aclHook(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} if type(args[2]) == 'string' then local converted = split(args[2], 46); local account = getAccount(converted[2]); if account then updatePlayerACL(getAccountPlayer(account)) end end end addDebugHook('preFunction', aclHook, {'aclGroupAddObject', 'aclGroupRemoveObject'}) function updatePlayerACL(player) if isElement(player) and getElementType(player) == 'player' then local account = getPlayerAccount(player) local accounts = {}; if account and not isGuestAccount(account) then for _, group in ipairs(aclGroupList()) do if isObjectInACLGroup('user.'..getAccountName(account), group) then accounts[#accounts+1] = aclGroupGetName(group) end end end setElementData(player, 'playerAccounts', accounts) return true end return false end Client side : function isPlayerInACLGroup(player, group) if (isElement(player) and getElementType(player) == 'player') and (type(group) == 'string') then local groups = getElementData(player, 'playerAccounts') or {} if type(groups) == 'table' and #groups > 0 then for _, value in ipairs(groups) do if value == group then return true end end return false end end return false end
  18. يا حلو هو عطاه الساينتكس
  19. @*RayaN-Alharbi. ناقصك then
  20. function changeWalkingStyle(_, changeModel, _, _, _, spawnModel) local skin = eventName == 'onElementModelChange' and changeModel or (eventName == 'onPlayerSpawn' and spawnModel) local model, walkingStyle = 0, 121; if skin then if getElementType(source) == 'player' then if skin == model then setPedWalkingStyle(source, walkingStyle) else setPedWalkingStyle(source, 0) end end else for _, player in ipairs(getElementsByType('player')) do if getElementModel(player) == model then setPedWalkingStyle(player, walkingStyle) else setPedWalkingStyle(player, 0) end end end end addEventHandler('onElementModelChange', root, changeWalkingStyle) addEventHandler('onPlayerSpawn', root, changeWalkingStyle) addEventHandler('onResourceStart', root, changeWalkingStyle)
×
×
  • Create New...