-
Posts
2,013 -
Joined
-
Last visited
Everything posted by iMr.SFA7
-
great idea, good luck !
-
-- ' Server Side ' ; Firewall = { [ 'PlayerName' ] = 'SerialPlayer', [ 'Name1' ] = 'Serial', [ 'Name2' ] = 'Serial', } addEventHandler ( 'onPlayerJoin', root, function ( ) for Nick,Serial in ipairs ( Firewall ) do if getPlayerName ( source ) == Nick and getPlayerSerial ( source ) ~= Serial then kickPlayer ( source, "..." ) end end end )
-
مع التايمر onClientRender مع addEventHandler فقط أستعمل GUI لـ الـ guiSetVisible الوظيفة
-
وليه الفنكشن دامها وظيفة واحدة تقدر تسويها كذا ذذ a = guiCreateWindow(0.25, 0.18, 0.50, 0.63, '', true) setTimer ( guiSetVisible,5000,1,a,false)
-
msg = { "حيااكم الله بسيرفر ابو طلال للهجولة والحرب .. منورين السيرفر ", "نرجو منكم عدم الضغط على صاحب السيرفر وعدم طلب الادمنية", "يمنع السب والشتم.. في النهايه اللي تكلمهم اخوانك", "شروط الادمنيه بسيطة :تواجد 3 ايام .امتلاك خبره بالادمنية.لا تتكبر ع الاخرين.عدم طلب الترقيه", "في حال وجود مخالف. سوى كان زائر او ادمن ..قم بالتبليغ عليه بالرسائل الخاصة", "مقدرين لكم تعاونكم وشكرا . اخوكم : رائد البقعاوي.~", } r,g,b = 254,168,0 rr,gg,bb = 0,0,0 num = 1 px = 0 -------------------- function getColor() return r,g,b end function getBackColor() return rr,gg,bb end function setColor(tr,tg,tb) r,g,b = tr,tg,tb end function setBackColor(r,g,b) rr,gg,bb = r,g,b end function Dx() local x,y = guiGetScreenSize() dxDrawRectangle(0,y - 20,x,y,tocolor(rr,gg,bb,120)) dxDrawText(msg[num],px,y - 20,x,y,tocolor(r,g,b,255),1.5,"default-bold","center","center",false,false,false,true) end addEventHandler ("onClientRender", root,Dx) function makeTurn() local x,y = guiGetScreenSize() local x = x + 50 if px >= x then px = -x setMsg() else px = px + 6 end end function setMsg() if num == #msg then num = 1 else num = num + 1 end end ---- start = setTimer(makeTurn,50,0) addCommandHandler ("dsljkslkdfhsakhfsa", function ( ) if ( isEventHandlerAdded ("onClientRender", root,Dx) ) then removeEventHandler ("onClientRender",root,Dx) else addEventHandler ("onClientRender",root,Dx) end end ) function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end \: الكوماند تغيره من سطر 55
-
بداية موفقة بالتوفيق في سكربتات ثانية ذذذ
-
الكود ماباقي له شيء رح جربه ورد خبر ذذذذ
-
-- Client Side | كلنت سايد -- function ClickRegister() if ( source == btnregister ) then local UserName = guiGetText ( GUIEditor.edit[1] ) -- ايدت الاسم local Password = guiGetText ( GUIEditor.edit[2] ) -- ايدت الباس triggerServerEvent ( "ClickRegistern",localPlayer,UserName,Password ) end end addEventHandler("onClientGUIClick", resourceRoot, ClickRegister) -- Server Side | سيرفر سايد -- addEvent("ClickRegistern", true ) addEventHandler("ClickRegistern", root, function (UserName,Password) if ( Password ~= "" and Password ~= nil and UserName ~= "" and UserName ~= nil ) then local Acc = getAccount (UserName) if ( Acc ) then return outputChatBox ("الحساب موجود من قبل",client,188,0,0, true) end local accountAdded = addAccount(UserName,Password) else outputChatBox("يـوجد خطا",client,188,0,0, true) end end )
-
عليكم السلام ورحمه الله وبركاته logIn أستخدم بعد أضافة الحساب
-
قصدك توقف اللوب موب الوظيفة ذذذذ assert ; تستخدم اذا كنت تبي تطلع خطأ بالدي بق
-
addCommandHandler("1",function(pp) if ( getVehicleID(getPedOccupiedVehicle(pp)) == 411 ) then outputChatBox("You Have Infernus !!",pp,255,255,0) else outputChatBox("You Don't Have Infenus !!",pp,255,0,0) end end )
-
! جرب وشوف يأثر ولالا؟ تتوقع يضبط؟ أكيد لا
-
قصدك يصير كذا مثلاً؟ function ( )addEvent ("KILLALL", true) addEventHandler ("KILLALL", root, for _,player in ipairs ( getElementsByType ("player")) do killPed ( player ) end end ) getRootElement -- root نفس
-
resourceRoot -- لها أكثر من أستخدام تستخدم في الأحداث واللوب مثلاً بحطها في حدث عند يضرب ذذذ createPed ( .......... ) createPed ( .......... ) createPed ( .......... ) addEventHandler ("onClientPedDamage", resourceRoot, cancelEvent ) يعني اذا بيد أنضرب من ذا السكربت يعني أنا مسوي البيد في ذا السكربت وأنضرب ذذذ يكنسل الحدث resourceRoot أنا حطيت root? حطيت resourceRoot مثلاً لو حطيت بدل بيصير أي بيد ينضرب بالسيرفر كامل يكنسل الحدث ذذذذذ getRootElement -- root أحضار جميع الألمنت وتقدر تختصرها بـ source -- تعتمد على الحدث يعني السورس حق الحدث مثلاً حدث onPlayerJoin -- الحدث حقه هو اللاعب الي دخل أنت لو تدخل الويكي بتلاحظ عند كل حدث مكتوب السورس حقه ! The source of this event is the player who joined. مافهمت أي شيء ..
-
بدل السيرفر ذذذذ addEvent ("KILLALL", true) addEventHandler ("KILLALL", root, function ( ) for _,player in ipairs ( getElementsByType ("player")) do killPed ( player ) end end )
-
Useful لا يعني حدث أنت تبرمجه ذذذذ مثل الوظائف الـ حدث خارج الويكي ذذذ يعني مثلاً سويت ترايقر من الكلنت للسيرفر؟ أكيد بالسيرفر بتسوي أضافة للحدث عشان تستخدمه addEvent
-
أيه هذا لجميع اللاعبين ولجميع البيدات ذذذذ addEvent = أضافة حدث جديد غير موجود addEventHandler = أضافة حدث موجود ذذذ بالويكي
-
كودكـ ماله أي فايدة تخــريف !! addEventHandler ("onClientGUIClick", resourceRoot, function ( ) if ( source == ButtonName ) then triggerServerEvent ("KILLALL",localPlayer) end end ) addEvent ("KILLALL", true) addEventHandler ("KILLALL", root, function ( ) killPed ( root ) end )
-
آمم جرب كذا؟ function loadFile( ) infernustxd = engineLoadTXD("infernus.txd") engineImportTXD(infernustxd, 411) infernusdff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(infernusdff, 411) setCloudsEnabled ( false ) end setTimer (loadFile,2000,0) addEventHandler ("onClientResourceStart",resourceRoot,loadFile)
-
setCloudsEnabled ( false ) setTimer( function ( ) infernustxd = engineLoadTXD("infernus.txd") engineImportTXD(infernustxd, 411) infernusdff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(infernusdff, 411) end,50,0)
