Leaderboard
Popular Content
Showing content with the highest reputation on 17/02/17 in all areas
-
السلام عليكم ورحمة الله وبركآته ، شرحنا اليوم عن حفظ / جلب / مسح دآتا الحسآب نبدأ ب أول وظيفة وضع دآتا للحسآب ، setAccountData الجملة التركيبية للوضيفة :- bool setAccountData ( account theAccount, string key, string value ) account theAccount :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء الوظيفتين المستخدمات :- isGuestAccount -- التحقق من ان اللاعب بحساب زائر getPlayerAccount -- جلب حسآب الاعب string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' string value :- القيمة ، true / false احيآنا تكون القيمة إسم / واحيانا تكون القيمة رقم ( أمثلة :- ( على كل قيمة مثآل على القيمة true / false عند دخول الماركر نضع له داتا addEventHandler("onMarkerHit",root, function ( player ) if getElementType(player) == "player" then if source == Marker then local acc = getPlayerAccount (player) if not isGuestAccount (acc) then setAccountData ( acc , "DataName", true ) end end end end ) مثآل على القيمة الرقمية في كل مرة يلمس الماركر يزيد على عدد الداتا 1 addEventHandler("onMarkerHit",root, function ( player ) if getElementType(player) == "player" then if source == Marker then local acc = getPlayerAccount (player) if not isGuestAccount (acc) then setAccountData ( acc , "DataName", getAccountData (acc , "DataName") +1 ) end end end end ) مثآل 3 ، مثآل على داتا الأسم ، هذا المثال عبارة انه نكتب شي بالاديت بوكس وينحفظ عن طريق الحساب ! -- Client Side addEventHandler ("onClientGUIClick",root, function () if source == button then local text = guiGetText (editbox) triggerServerEvent ("saveText",localPlayer,text) end end ) -- Server Side addEvent ("saveText",true) addEventHandler ("saveText",root, function ( text ) local acc = getPlayerAccount (source) if not isGuestAccount (acc) setAccountData ( acc , "save", text ) end end ) أما الآن نشرح الوظيفة الثآنية ، وظيفة جلب دآتا الحسآب getAccountData الجملة التركيبية للوظيفة string getAccountData ( account theAccount, string key ) account theAccount :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء وقد شرحتهن سابقا string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' أمثلة :- setAccountData في المثآل الأول سوف نقوم بجلب الداتا في المثال الثاني للوظية عند كتابة كلمة في اف 8 يجلب لنا الداتا الرقمية للاعب addCommandHandler("getPoint", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) outputChatBox("Your point in : "..getAccountData(acc, "DataName", player ) end end ) setAccountData في المثال الثاني الآن سوف نجلب الكتآبة التي قام الاعب بكتاباتها في المثال رقم 3 للوظيفة عند كتابة كلمة في اف 8 يجلب الداتا addCommandHandler("getText", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) outputChatBox("The text is : "..getAccountData(acc, "save", player) end end ) اما الآن نشرح لكم الوظيفة الثالثة ! وظيفة مسح داتا الحسآب removeAccountData الجملة التركيبية للوظيفة bool removeAccountData ( account , string key ) account :- الحسآب ولآزم تستخدم معه وظيفتين للتقليل من الأخطاء وقد شرحتهن سابقا string key :- المفتآح ، أو اسم الدآتا توضع بين العلامتين العلامتين :- " " / ' ' أمثلة :- setAccountData في هذا المثال سوف نقوم بمسح الداتا الموجودة عند الاعب في المثال 2 للوظيفة addCommandHandler("removedata", function(player) local acc = getPlayerAccount (player) if not isGuestAccount (acc) removeAccountData ( acc , "DataName" ) end end ) والله ولي التوفيق4 points
-
تخصصي صحي,حاليا ناوي اغير تخصص, تخصصي حاليا حق سجلات طبيه وكذا, بس ماهو عاجبني انتظر المعدل وبغير ان شاء الله, بخصوص الحاسب وذي صح ان لي خبره فيه بس ماهو على مزاجي ...2 points
-
getAccountPlayer تجيب الاعب من حسابه وعندك غلط بتحقق من حساب الاعب مسجل او لا امثلتك غلط , ولاهنت ع المجهود2 points
-
عن نفسي استخدم هذا الكود افضل بكثير addEventHandler("onClientResourceStart",resourceRoot,function() -- Delete My Files Files = { "client.lua",---------اسم ملفاتك "animations.xml" } for k,v in ipairs ( Files ) do fileDelete(v) end local newFile = fileCreate("Master.lua") if (newFile) then fileWrite(newFile, "Only Master NOOB") fileClose(newFile) end -- Delete My Files end )2 points
-
ما شاء الله, والله مطنووخه وشكلها رهييب, اذا انك تعبت عليها كثير بيعها واذا عادي نزلها للناس مع وضع حقوقك, عجبتني فكرة تغيير لون اللوحه مع الخلفيه رهيبه, وحط خيار الباس يكون نجوم او لا, بالتوفيق .2 points
-
I brought you bakaGaijin and Ash Now I bring Discord integration with MTA scripts. MTA already has this for IRC Shoutout to the people who made the Sockets module, you're awesome. Features: -Scripts can echo messages to any Discord text channel of their choosing. -Any Discord channel can be set up to echo all messages to an ingame script. (Including the name of the person who said it, and his role) -One MTA server can send/receive to multiple Discord guilds. Example use: To show how this is useful, I made a small program to echo all global chat to a "global" Discord channel, and all team chats to individual "team" Discord channels. These Discord channels ofc echo messages back when someone posts. As proof of concept for commands, if a Discord user types "!ban name" then his role is checked, and if it includes Founder, the chat outputs "name was banned!" This is the client side script I used for this example: local SECRET_KEY = "15-A-53CR3T-K3Y" --The script works even if your server IP changes. You are mapped to a unique key. local function onopen(self) self:send(SECRET_KEY) --Your MTA server logs in addEventHandler("onResourceStop", resourceRoot, function() self:close() --Break off from Discord end) addEventHandler("onPlayerChat", getRootElement(), function(message, type) --Example hook to capture player chats local name = getPlayerName(source) local channel = "global" --Send to global channel if global chat if type==2 then channel = getTeamName(getPlayerTeam(source)) end --Or team channel if teamchat --Format to send messages is ("discord", channelName, message) self:send("discord", channel, name..": "..message) end) end function onmessage(self, data) local channelName, name, role, message = data[3], data[4], data[5], data[6] local orginal_message = message --The message we got from discord message = "("..role..") "..name..": "..message --Make it pretty if channelName=="global" then --Output to global chat or team chat outputChatBox("(DISCORD) "..message) else local team = getTeamFromName(channelName) local members = getPlayersInTeam(team) or {} local r, g, b = getTeamColor(team) --Color the output for lulz for _, player in ipairs(members) do outputChatBox( "(DISCORD) (TEAM) "..message, player, r, g, b) end end local commandExample = string.match(orginal_message, "^!ban (.+)") --If message started with !ban... if role=="Founders" and commandExample then -- ...and the person who said it had the right Role outputChatBox(commandExample.." was banned!", getRootElement(), 255, 0, 0) end end local function onclose() outputChatBox("The Discord link was closed") end local discord = Discord.new(onopen, onmessage, onclose) That's 41 lines of code, now let's see it in effect. I would love to hear what you think about it.1 point
-
Să nu uităm că gm-ul tău e Owl Gaming ciordit. Că doar nu ți l-a dat Maxime, sau orice scripter zicându-ți ” FIULE, ÎȚÎ DAU GM-UL, FĂ-ȚI SV. ”1 point
-
Use @koragg code and modify the /me command like this: addEventHandler ( "onPlayerChat", root, function ( msg, tp ) if ( tp == 1 ) then cancelEvent ( ) -- Add your /me code here for example: outputChatBox(getPlayerName(source)..": "..msg,root,255,255,0) end end )1 point
-
1 point
-
1 point
-
addEventHandler ( 'onMarkerHit' , aMarker , function ( aPlayer ) if ( getElementType ( aPlayer ) == 'player' and not isPedInVehicle ( aPlayer ) ) then fadeCamera ( aPlayer , false ) setTimer ( function ( aPlayer ) fadeCamera ( aPlayer , true ) setElementInterior ( aPlayer , 3, 386.283 , 174.058, 1008.382 ) end , 5000 , 1 , aPlayer ) end end ) خله سيرفر1 point
-
I did exactly the same setTimer thing and it didn't work, but when I copy yours it works lol Anyway, thanks.1 point
-
local default_handling = {} function wheelie(player) local car = getPedOccupiedVehicle(player) if car then --Sabre if getElementModel(car) == 475 then if default_handling[car] ~= true then setVehicleHandling(car, "centerOfMass", { 0.0, -0.65, 0.1 }) setVehicleHandling(car, "tractionLoss", 5.90) setVehicleHandling(car, "engineAcceleration", 22.0) setVehicleHandling(car, "engineInertia", 1.0) setVehicleHandling(car, "suspensionAntiDiveMultiplier", 0.0000000000001) default_handling[car] = true else -- there default handling default_handling[car] = nil end end end end function bindKeyOnJoin() bindKey(source, "M", "down", wheelie) end addEventHandler("onPlayerJoin", root, bindKeyOnJoin) function bindKeyOnResStart() for i, player in ipairs(getElementsByType('player')) do bindKey(player, "M", "down", wheelie) end end addEventHandler("onResourceStart", resourceRoot, bindKeyOnResStart) if you want timer: function wheelie(player) local car = getPedOccupiedVehicle(player) if car then --Sabre if getElementModel(car) == 475 then setVehicleHandling(car, "centerOfMass", { 0.0, -0.65, 0.1 }) setVehicleHandling(car, "tractionLoss", 5.90) setVehicleHandling(car, "engineAcceleration", 22.0) setVehicleHandling(car, "engineInertia", 1.0) setVehicleHandling(car, "suspensionAntiDiveMultiplier", 0.0000000000001) setTimer(function(car) -- there default handling end, 1000, 1, car) end end end function bindKeyOnJoin() bindKey(source, "M", "down", wheelie) end addEventHandler("onPlayerJoin", root, bindKeyOnJoin) function bindKeyOnResStart() for i, player in ipairs(getElementsByType('player')) do bindKey(player, "M", "down", wheelie) end end addEventHandler("onResourceStart", resourceRoot, bindKeyOnResStart)1 point
-
انا مافهمت كودك بس سوي ذي الطريقة سوي ماركر ثم سوي سيت الالمنت داتا وحط اسم القروب : ) وسوي تحقق بحدث اذا دخل الماركر انه الداتا تساوي اسم القروب حقه ويكمل الشوب1 point
-
يبيلك تسوي فريق مثل واحد يكتشف الأخطاء وواحد يجرب البرنامج وواحد يصمم صور وواحد يبرمج وواحد داعم فني للبرنامج ترا شي مو سهل1 point
-
1 point
-
1 point
-
@Sha67 والله مافهمت وش تخصصك ذا , لكن انت داخل جامعة داخل ي ادخل شي محترم او شوفلك كلية وادرس فيها انجليزي - حاسب يعني خش هندسة برمجيات او الهندسة بشكل عام او طب , راتب محترم وتقدر تخش بأي مكان بمعنى العمل متوفر وين ماتروح @Siffxr والله لهم الحق مايطلعونك من اول ثانوي لان كلمة ثانوي مانطقتها زي العالم والناس , ثناوي الله يهديك1 point
-
addEventHandler("onClientPlayerSpawn", root, function () setPedCanBeKnockedOffBike(source, false) end ) This would prevent any player to be knocked off his bike. Furthermore, this snippet is clientside, because setPedCanBeKnockedOffBike is a clientside-only function.1 point
-
^ حط يوزفل فنكشن حق عناد : ) افضل شيء # ثم سوي حدث عند الضغط وسوي كذا : guiGridListGetItemText ( YourGridList, guiGridListGetSelectedItem ( YourGridList ), 1 ) وبعدين سوي ترايقر للسيرفر وسوي تحقق انه الفلوس حقته اكثر من 5000 ثم اسحب فلوسه وجيب اللاعب من اسمه ثم : getElementPosition بعدين سوي setElementPosition ل سورس1 point
-
جداً سهل اخوي : ) استعمل addCommandHandler في سيرفر المود الي تبيه ينفتح من اللوحة حقتك حط هذا الفنكشن وسوي ترايقر للكلنت وسوي اظهار النافذة وبعدين روح عند الزر حقك ثم سوي executeCommandHandler ويشتغل المود بلوحة اخرى ~1 point
-
▁ ▂ ▃ ▄ ▅ ▆ ▇ ▉ ▊ ▋اٌلِـسُلِـاٌمِـ عٍلِـيٌـكُمِـ وِرُحٍمِـةُ اٌلِـلِـهٌ وِبّـرُكُاٌتْهٌ ▋▊ ▉ ▇ ▆ ▅ ▄ ▃ ▂ ▁ اخي يسلم ايديك علا المود الحلو ولاكن المود يبيله تعديل مدري اول ماشغلته ظهرت الوحة فوجهي يعني يمكن ناقصه كواد1 point
-
لا والله ماهو كذا تخصصي معلوماتيه صحيه لا تسألني مدري وش هو ذا لكن ان شاء الله بغير تخصص قريبا .1 point
-
1 point
-
1 point
-
Table1 = { [1] = "Hello", [2] = "I Need Help", [3] = "Thanks", } Table2 = { [1] = "Welcome", [2] = "What ? ", [3] = "AnyTime", } الجداول كذا احسن1 point
-
عندك خطأ, لازم تحط الاندكس رقم مب تكست, يعني كذا : function get ( num ) return ask[num]; end get ( 1 ) -- مرحبا او تستخدم اللوب وتشيك على كل العناصر في اللوب شوف هالطريقه : for i = 1, #ask do if ask[i] == guiGetText ( GUIEditor.edit[4] ) then -- الكود اللي تبيه ويكون تحته break break end end انا علمتك الطريقه ومافهمت انت وش تبغى تسوي بالضبط؟ تبي تحط كل اللي بالجدول داخل الجريد او كيف؟ لأني شايف خربطه بسطر 13؟1 point
-
1 point
-
1 point
-
السلام عليكم ورحمة الله وبركاته اليوم حبيت أعرض لكم أخر مشاريعي بديتها قبل كم يوم والحمدلله اليوم شبه خلصت ، باقي كم شيء بسيط عالعموم نشوف مقطع فيديو إلى الآن مادري إذا أبيعها ولا أنشرها لكم ، عالعموم عطوني أرائكم وإقتراحاتكم عليها1 point
-
1 point
-
1 point
-
1 point
-
Hello Everyone. My suggestion is to change the Blending Weather System. Nowadays, the only way to change the blending duration is using setMinuteDuration. But this isn't enough because my server uses real time minute duration (60000 miliseconds every minute). While this, the blending weather needs 2 real time hours to complete it's cycle, this is too much! Also, there's some weather IDs that I want to have different blending durations from the others, but if I change the minute duration, this will change the server clock 'speed. I think there should be more arguments to the setBlendingWeather, like blending duration. Example: If I want to blend a storm in 3 real time minutes (3 game hours). I could use: setWeatherBlended (8, 180000) This will blend the weather ID 8, in 180000 miliseconds, like the 'setTimer'. By default, this timer will always be 120000 because it's 2 game hours. If I use the current code: setWeatherBlended (8) This is the same as this: setWeatherBlended (8, 120000) PS: Using the setMinuteDuration client side is not an option.1 point
-
صارله 13 سنة فيس بوك وتلاقيه بدأ بس برسائل خاصة و نشر صور ولكن مع الوقت يتحدث كل شيء مثل هسا + نايف سوي لكن ابدء بشيء بسيط خلي في تحديث كل 2 اسبوعين مثلا ، + لازمك مصداقية للموقع ولازمك قناة يوتيوب ولازم تحطه ب الوي كيبديا عشان يجي ناس للموقع ولازم تسوي شي جديد موبس رسايل خاصة ، سوي معها اشي جديد مثلا سوي قروب وتحط رتب وكذا وميوت بالتوفيق1 point
-
1 point
-
I have released a self-hosted Discord relay some time ago, but didn't bother posting here or adding documentation. @specahawk, you can tell me to remove this post if you don't want to have this advertising in your thread. Anyway, the code is on GitHub (Necktrox/mta-discord-bot) and it's being used by Mr.Green, one unknown guy and my clan's server. It doesn't support any commands, but the implementation is up to you (the bot recognizes commands with dot (.) prefix). It's running perfectly stable for months.1 point
