- 
                
Posts
1,992 - 
                
Joined
 - 
                
Last visited
 - 
                
Days Won
4 
Everything posted by 3NAD
- 
	http://www.mediafire.com/?ce6q2laafe1rb9r
 - 
	Enad_ = { } addEventHandler ( "onClientPlayerWasted", localPlayer, function ( ) if source == localPlayer and not Enad_[source] then Enad_[source] = true; Enad_[source] = setTimer ( removeProtection_, 5000, 1, source ); end end ) addEventHandler ( "onClientPlayerDamage", localPlayer, function ( ) if source == localPlayer and Enad_[source] then cancelEvent ( ); end end ) removeProtection_ = function ( aClient ) if Enad_[aClient] then Enad_[aClient] = false; end end
 - 
	فيه امكانية تختصر كودك بدال كثرة الإيفنت و التريقر ليكون بالشكل التالي .. -- Client Side GUIEditor_Grid = {} GUIEditor_Button = {} Vehicle = guiCreateWindow(453,218,302,379,"x[ Vehicle Systm ]x",false) guiSetVisible(Vehicle,false) guiSetAlpha (Vehicle, 1) GUIEditor_Button[5] = guiCreateButton (0.0795,0.8575,0.4007,0.1135,"x[ set ]x",true,Vehicle) GUIEditor_Button[4] = guiCreateButton (0.5166,0.8602,0.4007,0.1135,"x[ close ]x",true,Vehicle) GUIEditor_Grid[1] = guiCreateGridList(0.106,0.1214,0.7583,0.6887,true,Vehicle) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) col = guiGridListAddColumn(GUIEditor_Grid[1],"Vehicle ",0.9) guiSetAlpha(GUIEditor_Grid[1],0.89999997615814) CarsTable = { { "Sultan" }, { "Banshee" }, { "Cheetah" }, { "Admiral" }, } for i, v in ipairs ( CarsTable ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, v[1], false, true ) end marker = createMarker ( x,y,z, "cylinder", 2, 255, 0, 0, 255 ) addEventHandler ( "onClientMarkerHit", marker, function ( player ) if ( getElementType ( player ) == "player" ) and ( player == localPlayer ) and not isPedInVehicle ( player ) then guiSetVisible ( Vehicle, true ) showCursor ( true ) end end ) addEventHandler ( "onClientGUIClick", root, function ( ) if source == GUIEditor_Button[5] then local aGet = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) if aGet == "" then return end triggerServerEvent ( "onSelectedVehicle", localPlayer, aGet ) guiSetVisible ( Vehicle, false ) showCursor ( false ) elseif source == GUIEditor_Button[4] then guiSetVisible ( Vehicle, false ) showCursor ( false ) end end ) -- Server Side Vehicles = { } addEvent ( "onSelectedVehicle", true ) addEventHandler ( "onSelectedVehicle", root, function ( vehicleName ) if Vehicles [ source ] then destroyElement ( Vehicles [ source ] ) end local vName = getVehicleModelFromName ( vehicleName ) if vName then local x, y, z = getElementPosition ( source ) Vehicles [ source ] = createVehicle ( vName, x, y, z ) warpPedIntoVehicle ( source, Vehicles [ source ] ) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if Vehicles [ source ] then destroyElement ( Vehicles [ source ] ) Vehicles [ source ] = nil end end ) الباقي عليكـ تضيف المواتر بـ جدول الكلنت ذذ
 - 
	addEventHandler ( "onClientGUIClick", root, function ( ) if source == [ButtonName] then -- Add Your Code. elseif source == [ButtonName] then -- Another Button -- Add Your Code. end end )
 - 
	طيب شفيك زعلان ؟ قاعد اوضح له إيش اللي تغير بالكود
 - 
	الجدول قبل وبعد CarsTable = { {"1-","Vehicle (1)"}, {"2-","Vehicle (2)"}, {"3-","Vehicle (3)"}, {"4-","Vehicle (4)"} } CarsTable = { { "Vehicle (1)" }, { "Vehicle (2)" }, { "Vehicle (3)" }, { "Vehicle (4)" } } ======================= @ Rm-Dj : GUIEditor_Grid = {} Vehicle = guiCreateWindow(453,218,302,379,"x[ Vehicle Systm ]x",false) guiSetAlpha (Vehicle, 1) aset = guiCreateButton (0.0795,0.8575,0.4007,0.1135,"x[ set ]x",true,Vehicle) close = guiCreateButton (0.5166,0.8602,0.4007,0.1135,"x[ close ]x",true,Vehicle) GUIEditor_Grid[1] = guiCreateGridList(0.106,0.1214,0.7583,0.6887,true,Vehicle) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"Vehicle ",0.2) guiSetAlpha(GUIEditor_Grid[1],0.89999997615814) CarsTable = { { "Sultan" }, { "Banshee" }, { "Cheetah" }, { "Admiral" }, } for i, v in ipairs ( CarsTable ) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, 1, v[1], false, true ) end عدل على الجدول ذذذ
 - 
	تعديل بسيط على كود برستيج Grid = guiCreateGridList ( ...... ) guiGridListAddColumn ( Grid, "#", 0.4 ) guiGridListAddColumn ( Grid, "Vehicle", 0.4 ) CarsTable = { { "Vehicle (1)" }, { "Vehicle (2)" }, { "Vehicle (3)" }, { "Vehicle (4)" } } for i, v in ipairs ( CarsTable ) do local row = guiGridListAddRow ( Grid ) guiGridListSetItemText ( Grid, row, 1, i, false, true ) guiGridListSetItemText ( Grid, row, 2, v[1], false, true ) end وهو ان الترقيم كان يدوي بالجدول ..
 - 
	source: The source of this event is the GUI element that was pointed at. https://wiki.multitheftauto.com/wiki/OnClientMouseEnter https://wiki.multitheftauto.com/wiki/OnClientMouseLeave
 - 
	-- Server Side addCommandHandler ( "setMoney", function ( thePlayer, _, toWho, aMoney ) if toWho and aMoney then local theAccount = getAccount ( toWho ) if theAccount then local theMoney = tonumber ( aMoney ) if theMoney and theMoney >= 0 then setAccountData ( theAccount, "money", theMoney ) outputChatBox ( "[setMoney]: Account [ "..getAccountName ( theAccount ).." ] And Money [ $"..theMoney.." ] Done !", thePlayer, 255, 255, 0 , true ) else outputChatBox ( "[setMoney]: Error, Add Real Number !!", thePlayer, 255, 0, 0 , true ) end else outputChatBox ( "[setMoney]: Error, Not Found This Account!!", thePlayer, 255, 0, 0 , true ) end else outputChatBox ( "/setMoney [account] [money]", thePlayer, 150, 150, 0, true ) end end )
 - 
	هذا مثال طبقته بالجدول لو تبي تضيف اكثر من حساب ..
 - 
	اذا انت مسوي حفظ فلوس في الحساب هات اسم الداتا حق الحفظ
 - 
	استبدل بـ الأدمنية اللي عندك http://www.mediafire.com/?z1a3bu4k9k71zy6 طبعاً التعديل كله كان بـ ملف admin\server\admin_server.lua
 - 
	اللي افهمه منك تبي اللي بالتيم مايتقاتلون ؟ او اللي يطلق على خويه بالتيم ينقص من دم القاتل 20 ؟
 - 
	اعتقد فيه امكانية .. بس يبي لك تعدل على ملف سيرفر بـ الأدمنية ..
 - 
	wiki.multitheftauto.com/wiki/GetElementsByType theType إقرا
 - 
	طيب حلو اهم شيء انك فهمت طريقة الباراميترس وراح تفيدك كثير وانا نسيت جلب اسم الحساب من المعرف نفسه .. واعتقد تقدر تختصر كودك بدال كثرة الوظايف بـ الشروط if --- elseif --- end او بالجداول Accounts = { "1", "2", } if Accounts [ getAccountName ( RealAccount ) ] then ---- end
 - 
	TeamTeam = createTeam ( "Team", 0, 255, 0 ) function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) if RealAccount == "الحساب" then setPlayerTeam ( source, TeamTeam ) end end addEventHandler ( "onPlayerLogin", root, setTeamTeam ) الوظايف هذي getAccountName getPlayerAccount ماتحتاجها . . ليه ؟ Parameters لأن في نفس الإيفنت هذا والباراميترس مثل مانقول بالعامية هي المعرّفات " بـ شد الـ ر و عندك 3 معرفات جاهزة Ps: thePreviousAccount: The account the player was logged into before theCurrentAccount: The account the player logged into just now autoLogin: Whether this login was a result of an autologin طبعاً هذي اللي تضيفها بـ أقواس الفنكشن مثل ماهو عندك بالكود function setTeamTeam ( PrivousAccount, RealAccount, AutoLogin ) طبعاً مو ضروري نفس الإسم يطابقه حرف حرف واتمنى كلامي مافيه اخطاء = )
 - 
	كودكـ كلنت والوظظيفة هذي سيرفر Server اللي عليك .. اضف ملف جديد بـ جانب مع الوظيفة اللي عطيتكـ فوق
 - 
	هي كلها بـ الكود ذا guiSetVisible
 - 
	اعتقد ان طريقتكـ راح تسبب لآق .. لأن كل طلقة راح يحول تريقر ذذذذذ الأفضل ان يكون ثابت بـ سيرفر for _, v in ipairs ( getElementsByType ( "team" ) ) do setTeamFriendlyFire ( v, false ) end
 - 
	-- Client Side yazan = createMarker( -2924.978515625, -736.68469238281, 170.0874938964, "cylinder", 2, 255, 255, 255, 150 ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(149,62,486,448,"اختيار الفريق",false) guiSetVisible ( GUIEditor_Window[1], false ) GUIEditor_Image[1] = guiCreateStaticImage(120,248,78,191,"images/yazan2.png",false,GUIEditor_Window[1]) GUIEditor_Image[2] = guiCreateStaticImage(327,249,82,190,"images/yazan1.png",false,GUIEditor_Window[1]) CloseBtn = guiCreateButton(430,20,35,35,"X",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(329,211,76,35,"الاردن",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(121,219,77,29,"السعودية",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(9,87,477,65,"ليس الهدف ان تكون اردني او سعودي او اي دوله تم صنع مود من اجل تسليه فقط",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(209,223,121,24,"نحنا اخوان كلنا عرب",false,GUIEditor_Window[1]) addEventHandler ( "onClientMarkerHit", yazan, function ( hitElement ) if ( guiGetVisible ( GUIEditor_Window[1] ) == false ) and ( getElementType ( hitElement ) == "player" ) then guiSetVisible ( GUIEditor_Window[1], true ) showCursor ( true ) end end , false ) addEventHandler ( "onClientMarkerLeave", yazan, function ( leftElement ) if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) and ( getElementType ( leftElement ) == "player" ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end , false ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[1] ) then triggerServerEvent ( "spawnHim1", localPlayer ) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent ( "spawnHim2", localPlayer ) elseif ( source == CloseBtn ) then guiSetVisible ( GUIEditor_Window[1], false ) showCursor ( false ) end end ) -- Server Side jordan = createTeam ( "Jordan", 255, 0, 0 ) ksa = createTeam ( "KSA", 255, 255, 0 ) addEvent ( "spawnHim1", true ) addEventHandler ( "spawnHim1", root, function ( ) setPlayerTeam ( source, jordan ) setCameraTarget ( source, source ) setElementPosition ( source, -2924.978515625, -736.68469238281, 170.08749389648 ) setElementModel ( source, 105 ) outputChatBox ( 'تم نقلك الى فريق الاردن', source, 255, 255, 255, true ) end ) addEvent ( "spawnHim2", true ) addEventHandler ( "spawnHim2", root, function ( ) setPlayerTeam ( source, ksa ) setCameraTarget ( source, source ) setElementPosition ( source, -2990.9272460938, -437.00256347656, 164.16250610352 ) setElementModel ( source, 128 ) outputChatBox ( 'تم نقلك الى فريق السعودية', source, 255, 255, 255, true ) end )
 - 
	الدعم مهوب مسن ذا مراسلات بريدية فقط #
 
