Jump to content

King12

Members
  • Posts

    436
  • Joined

  • Last visited

Everything posted by King12

  1. King12

    antiban

    function outputBan ( banPointer, responsibleElement ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then for _,ban in ipairs(getBans()) do if getBanSerial(ban) == getPlayerSerial(source) then setTimer ( function() removeBan (ban) end, 1000, 1 ) local banner = getPlayerSerial ( responsibleElement ) or nil if banner then addBan ( nil, nil, banner , root, "You were banned for banning a staff member") outputChatBox(getPlayerName(banner).." has been banned for banning a staff member") else return end else return end end else return end end addEventHandler ( "onPlayerBan", getRootElement(), outputBan ) Other than that, is impossible.
  2. King12

    antiban

    remove the ban after it's added.
  3. King12

    antiban

    I believe that is impossible, because onPlayerBan is triggered once the ban is added to the banlist.
  4. King12

    antiban

    It would be better to modify the admin panel. Go to admin/server/ and open admin_server.lua search for this: at line ~855 elseif ( action == "ban" ) then and add this line after it: elseif ( action == "ban" ) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then outputChatBox( getPlayerName(source).."#ff0000 tried to ban you.", player, 255, 0, 0, true) return false end Same goes for kick, if you want to. if ( action == "kick" ) then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then outputChatBox( getPlayerName(source).."#ff0000 tried to ban you.", player, 255, 0, 0, true) return false end Note: this works with admin commands too.
  5. اسم السيرفر يستند على أسم الشركة المستضيفة, السيرفر للعرب 100% وللتأكيد على ذلك, لايستطيع أي أجنبي الدخول للسيرفر لأنهم محظورين من الشركة.
  6. السلام عليكم ورحمة الله وبركاته .الحمدلله بعد الانتهاء من العمل على السيرفر, حبيت أشارككم بعض الصور من السيرفر, وباقي الكثير راح تشوفونه يوم تشرفوننا في السيرفر -|- .نبدأ بالسكوربورد, فيه أهم الاحصائيات اللي تحتاجها بدلاً من إستخدام كل مره اليوزربانل -|- .زي ماهو موضح في الصورة, إحصائيات كاملة للاعب, وأكيد راح تتنوع أكثر مع الوقت -|- .Infernusهنا تقدر أنك تشتري شخصية وجنط للسيارة وقريباً إن شاء الله خيار لشراء نوع الـ -|- ..صفحة الإعدادات مهمة لكل لاعب, يوجد فيها إظهار المشاهدين وإخفاء السيارات, إلخخ -|- .وأهم شي يحتاجه كل سيرفر, وهي الإحصائيات العامة للاعبين في السيرفر .طبعاً اللي يميز السيرفر كما هو وضح في أول صورة, أن الاستضافة موجودة في الكويت وهذا يعني بنق أقل لدول الخليج mtasa://193.105.56.70:37000 :الدخول المباشر للسيرفر [CCD] Cyber Camo Dudes - Race DD/DM/FUN :أو يمكنك البحث عن أسم السيرفر
  7. Hello there, is it possible to load custom infernus mod for each player? (and be synced to everyone)? e.g. I want player1 to have infernus mod 1, and player2 mod 2, and in the same time both mods should be synced.
  8. جربت نفس كود الشباب ويشتغل, المشكلة من عندك. تأكد انه مافيه حدث ثاني ل onPlayerChat. function onChat () local account = getPlayerAccount ( source ) if isGuestAccount ( account ) then cancelEvent() outputChatBox( "[Login-System] #ffffffYou should login to talk in chat . ", source, 255, 255, 0, true) else return end end addEventHandler("onPlayerChat", root, onChat)
  9. Hello, I managed to export flag but I couldn't export country name in the same column. How can I do it? -- Script code exports.scoreboard:addScoreboardColumn('Country') function showcountry() local flag = exports.admin:getPlayerCountry ( source ) if flag then setElementData(source,"Country",":admin/client/images/flags/"..flag..".png") else flag = "N/A" end end addEventHandler("onPlayerJoin",getRootElement(),showcountry) -- Scoreboard code elseif column.name == "Country" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI )
  10. Hello, I've used the "getPlayerFromPartialName", but always returns that player wasn't found and no errors in debugscript. function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function betOnPlayer ( player, cmd, amount, player2 ) if amount and player2 then local player1 = getPlayerFromPartialName ( player2 ) if player1 then -- code here else outputChatBox ( "#ff1111Player not found!", player, 255, 255, 255, true ) end else outputChatBox ( "#660000Use: #ffffff'/bet [player] [amount]' ..", player, 255, 255, 255, true ) end end
  11. حطيت الآيبي المفتوح, والحين يقول فشل الاتصال.
  12. السلام عليكم, حاولت أربط السيرفر بالphp بس مافهمت له, كل مره ادخل الصفحة يطلع لي لكن يوم أطلع من السيرفر ويكون فاضي, تشتغل الصفحة وتكون بيضاء. هذي الأكواد, أخذتها من واحد للتجربة: function get_player_count() local player_count = #getElementsByType("player") if player_count then local player_count = toJSON(player_count) return player_count end end <meta> <export function="get_player_count" type="server" http="true"/> <script src="players.lua" type="server" /> </meta> <?php include("mta_sdk.php"); $server_ip = 127.0.0.1; $server_port = 22003; $server_username = "mta_php_sdk"; $server_password = "xxxxxxxxxxx"; $resource_name = "mta_php"; $function_c = "get_player_count"; $mta = new mta($server_ip,$server_port,$server_username,$server_password); $result = $mta->getResource($resource_name)->call($function_c); if (isset($result)){ $player_count = json_decode($result) if (isset($player_count)){ echo "Player count: ".$player_count."."; } } ?> للي بيسأل, عطيت اليوزر والسكربت أدمنية؟ نعم.
  13. Hello there MTA;SA Developers, Since my work in mtasa was almost recording maps etc.. I thought about buying a good and efficient for my work. I got myself CPU : i7-6700K 4.0GHz CPU Cooler : Cooler Master: Hyper 212 EVO. Why? Because I'm not planning to overclock my pc anytime soon. GPU : MSI R9 390 Gaming 8GB MB : Gigabyte LGA1151 Intel Z170 2-Way SLI ATX DDR4 Motherboards GA-Z170X-Gaming 7 RAM : Corsair Vengeance LPX 8GB (2 x 8GB) DDR4 DRAM 2400MHz PU : COUGAR 700W Bronze my MTADiag result; https://pastebin.mtasa.com/173860872
  14. Hello there, I've made a custom-ed 3D model for mta:sa, I've done the collusions and txd/dff files. but the main problem is that I'm still having an un-textured object. Could you please help me to find the solution? [ Error loading TXD @ 'engineLoadTXD' [box02.txd] Bad argument @ 'engineImportTXD' [Expected txd at argument 1, got boolean] ] It must be a grass (soccer) field.
  15. شلون صارت دي اكس بالفوتوشوب :3 يسوي للصورة تأثير زيتي او تأثير ضبابي واذا يبي اسويله ما عندي مشكلة بس يجي خاص صورة عادية حاطينها على كبر الشاشة.. الخلفيه مو صوره لو تدخل وتشيك بنفسك بتلاحظ ان اللعبه تسوي لود للآوبجكتات مثل الشاطئ.
  16. http://r.weavesilk.com/?v=4&id=xudvgd4ktu وهذي الشخصيه اللي رسمتها http://r.weavesilk.com/?v=4&id=pgqvge40z1
  17. Hello there, I've created a team called "Clan Staff" f.e, how can I set my team using /setteam to this team? I've tried /setteam King12 Clan Staff, but it's not working because there is a space between Clan and Staff. Any solutions?
  18. وظيفه سكرانه وما منها فايده تجيب لك اتجاه الصوت بالسماعه هو يمين ولا يسار https://wiki.multitheftauto.com/wiki/GetSoundLevelData وهذي اطلق وظيفه تنفع للي عنده راديو بالسيرفر https://wiki.multitheftauto.com/wiki/GetSoundMetaTags تنفع مع سكربتات مثل SHOUTcast للراديو
  19. وظيفة تجيب موجات الصوت زي كذا : https://wiki.multitheftauto.com/wiki/GetSoundFFTData
  20. .yuv files are great and its working fine with mtasa
  21. King12

    banPlayer

    Add this line under your banPlayer function : outputChatBox(getPlayerName(source).."is banned by Console. Reason : ( Tunisia is banned ).", root, 255,0,0,true)
×
×
  • Create New...