-
Posts
1,377 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Mr.Mostafa
-
كدا ما اشتغل *ملحوظة , انا عندي لما اموت يرسبن في نفس الثانية علطول*
-
لو استخدمت حدث onPlayerWasted عشان احفظ الاسلحة الي معه , بتكون الاسلحة صفر عشان راحت منه خلاص ؟
-
واخلي دول 800 x 600 ? ما يجي شي , الكلمة تيجي علي الشاشة حقتي مظبوطة وعلي شاشة خويي خربانة احداثيات مختلفة
-
سلام عليكم ابي اعرف وش الفرق بين الاكواد هادي , يعني مب كلهم نفس بعض ؟ removeElementData setElementData(false) setElementData(nil)
-
يب تمام , بس الموقع كيف اجيبه , يكون مجاني ولا مدفوع ولا كيف
-
سلام عليكم كنت ابي استفسر علي اذا اقدر اتابع اي رسايل في السيرفر عن طريق الجوال يعني مثلا اي رسايل بالسيرفر تيجي بموقع مجاني او شي او في فكرة زي هادي مثلا ؟
-
x[ طلب ]x - Anti Spam Change Nick - حماية من تغيير النك بسرعة
Mr.Mostafa replied to ~'Virus.'s topic in البرمجة
-
x[ طلب ]x - Anti Spam Change Nick - حماية من تغيير النك بسرعة
Mr.Mostafa replied to ~'Virus.'s topic in البرمجة
local tapleMrat = {} function nickChangeHandler(oldNick, newNick) local num = tapleMrat[source] or 0 if tapleMrat[source] == 3 then kickPlayer ( source,"تكرار تغير اسمك" ) cancelEvent() return end tapleMrat[source] = num+1 local plr = source setTimer(function() tapleMrat[plr] = num-1 end,30000,1) end addEventHandler("onPlayerChangeNick", getRootElement(), nickChangeHandler) ما جربته , تفضل جرب -
بعدلها الحين يب صح مدري كيف نسيتها
-
حاطها صح dxDrawText(string.gsub(text, "#%x%x%x%x%x%x", ""), 172 - 1, 171 - 1, 1195 - 1, 598 - 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_font, "center", "bottom", false, false, false, true, false) dxDrawText(string.gsub(text, "#%x%x%x%x%x%x", ""), 172 + 1, 171 - 1, 1195 + 1, 598 - 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_font, "center", "bottom", false, false, false, true, false) dxDrawText(string.gsub(text, "#%x%x%x%x%x%x", ""), 172 - 1, 171 + 1, 1195 - 1, 598 + 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_font, "center", "bottom", false, false, false, true, false) dxDrawText(string.gsub(text, "#%x%x%x%x%x%x", ""), 172 + 1, 171 + 1, 1195 + 1, 598 + 1, tocolor(0, 0, 0, 255), 1.00, dxfont0_font, "center", "bottom", false, false, false, true, false) dxDrawText(""..text.."", (screenW - 1023) / 2, (screenH - 427) / 2, ((screenW - 1023) / 2) + 1023, ( (screenH - 427) / 2) + 427, tocolor(255, 255, 255, 255), 1.00, dxfont0_font, "center", "bottom", false, false, false, true, false) end
-
طيب هي نفس الكود حقي تقريبا بس ليه حقي ما يشتغل
-
سلام عليكم وش الخطا بهذا الكود عشان جربت اكتر من محاولة وطفشت executeSQLQuery('CREATE TABLE IF NOT EXISTS moneySystem2 (theMoney,playerSerial)') setTimer(function() local Playerss = getElementsByType ( 'player' ) for _ , v in ipairs ( Playerss ) do local Check = executeSQLQuery('SELECT * FROM moneySystem2 WHERE playerSerial = ?',getPlayerSerial(v)) if (#Check == 0 or not Check) then executeSQLQuery('INSERT INTO moneySystem2 (theMoney,playerSerial)',getPlayerMoney(v),getPlayerSerial(v)) outputChatBox('Saved',root,0,255,0,true) else executeSQLQuery('UPDATE moneySystem2 SET theMoney = ? WHERE playerSerial = ?',getPlayerMoney(v),getPlayerSerial(v)) outputChatBox('UPDATE',root,255,0,0,true) end end end,50,0)
-
سلام عليكم انا حاطط هادا الكود لتكست dxDrawText ولكن المشكلة يكون ظابط عندي ولكن عند خويي تجيله باماكن تانية علي الشاشة وش الحل عشان اخلي الكلمة تيجي لكل احداثيات الشاشة في نفس المكان _dxDrawRectangle = dxDrawRectangle _dxDrawText = dxDrawText _dxDrawLine = dxDrawLine _dxDrawImage = dxDrawImage sWidth, sHeight = guiGetScreenSize() local resolutionX = 1366 local resolutionY = 768 function dxDrawText( text,posX,posY,right,bottom,color,scale,mixed_font,alignX,alignY,clip,wordBreak,postGUI,kk,gg ) return _dxDrawText(tostring( text ), ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( right/resolutionX )*sWidth, ( bottom/resolutionY)*sHeight, color, ( sWidth/resolutionX )*scale, mixed_font, alignX, alignY, clip, wordBreak, postGUI, kk, gg) end function dxDrawRectangle( posX, posY, width, height,color,postGUI ) return _dxDrawRectangle(( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( width/resolutionX )*sWidth, ( height/resolutionY )*sHeight, color, postGUI) end function dxDrawImage( posX, posY, width, height, filename, rotation, r2, r3, color,postGUI ) return _dxDrawImage(( posX/resolutionX )*sWidth,( posY/resolutionY )*sHeight,( width/resolutionX )*sWidth,( height/resolutionY )*sHeight, filename, rotation, r2, r3, color, postGUI) end function dxDrawLine( posX, posY, width, height,color, size, postGUI ) return _dxDrawLine(( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( width/resolutionX )*sWidth, ( height/resolutionY )*sHeight, color, size, postGUI) end
-
x[ طلب ]x - Anti Spam Change Nick - حماية من تغيير النك بسرعة
Mr.Mostafa replied to ~'Virus.'s topic in البرمجة
بكيفك اذا تبي بس عموما فكرتها مب حلوة افرض غيرت اسمي مرة وكان فيه خطا في حرف وغيرته تاني انصك باند ؟ ليه -
x[ طلب ]x - Anti Spam Change Nick - حماية من تغيير النك بسرعة
Mr.Mostafa replied to ~'Virus.'s topic in البرمجة
تفضل يا غالي جرب local taple = {} function nickChangeHandler(oldNick, newNick) if ( taple [ source ] ) then outputChatBox("لا يمكنك تغير اسمك الا مرة كل دقيقة",source,255,0,0,true) cancelEvent() return end plr = source taple[plr] = true Timer = setTimer(function() taple[plr] = nil end,1*60*1000,1) end addEventHandler("onPlayerChangeNick", getRootElement(), nickChangeHandler) هادا بيخلي ماحد يقدر يغير اسمه الا كل دقيقة مرة وممكن تعدل المدة , عشان لاحد يسوي سبام تغير -
سلام عليكم ابي لما لاعب فلوسه تزيد او تنقص , تنحفظ في داتا استخدم addDebugHook ولا ما ينفع ولا رندر , ولا كيف؟
-
يب يب , اقصد يعني صحيح , ولا فيه مشكلة ؟
-
يب ظبطت تسلم , بس عندي استفسار الكود هادا صحيح , المفروض اني مسويه يجيب اعلي رتبة مع الاعب في الجدول function getPlayerRank(player) local playerAccount = getPlayerAccount ( player ) local groups = ranksNumbers if not isGuestAccount ( playerAccount ) then for i, v in ipairs(groups) do if isObjectInACLGroup ( "user."..getAccountName ( playerAccount ), aclGetGroup ( v[2] ) ) then outputChatBox(v[2],root,255,0,0,true) status = v[2] return status end end if (not status) then return "Player" end end end
-
local ranksNumbers = { {1,"Console","ConsoleData"}, {2,"Console2","Console2D"}, {3,"Admins","Admins29"}, } function isRank(player,rank) local playerAccount = getPlayerAccount ( player ) local groups = aclGetAccountGroups( playerAccount) if not isGuestAccount ( playerAccount ) then for i, v in ipairs(groups) do if ranksNumbers[v] then if (ranksNumbers[v][1] <= ranksNumbers[rank]) then status = true return status end end end if (not status) then return false end end end addCommandHandler("checkRank", function(source) local result = isRank(source,"Console2") outputChatBox(tostring(result)) end ) function aclGetAccountGroups ( account ) local acc = getAccountName ( account ) if ( not acc ) then return false end local res = {} acc = "user."..acc local all = "user.*" for ig, group in ipairs ( aclGroupList() ) do for io, object in ipairs ( aclGroupListObjects ( group ) ) do if ( ( acc == object ) or ( all == object ) ) then table.insert ( res, aclGroupGetName ( group ) ) break end end end return res end حاولت اظبطها علي نظام الجدول هادا بس ما عرفت يعني بدل ["Console"] = 1 تكون { ""1"","Console } وهكذا
-
ما ظبط + ما يطلع شي في الشات ض
-
طيب لو ابي اجيب القيمة التانية مع الرقم كيف ؟ يعني مثلا كدا tbl = { "1","hello", "2","hi"} ابي يطلع اكبر رقم الي هو 2 , بعدين يجيب معها كلمة هاي