-
Posts
10,056 -
Joined
-
Days Won
27
Everything posted by iPrestege
-
الازارار واللبل مو محطوطين باللوحة + اللوحة متأكد منها لانها ماتظهر عليها الازرار عندي ^ و عندك ارقمنت زايد هنا للزر ثالث بس مافية اصلاً ! addEventHandler ( "onClientGUIClick",guiRoot, function ( ) if ( source == GUIEditor.button[1] ) then triggerServerEvent ( "call", localPlayer, "Police" ) close ( source ) elseif ( source == GUIEditor.button[2] ) then triggerServerEvent ( "call", localPlayer, "Medic" ) close ( source ) end end )
-
كامل الكلنت + كامل السيرفر بدون نقص عشان اشيك كامل .
-
You can simply check that if player have 5 or less as you're doing and check if the player have 12 and less . function createTest1 ( ) if getElementData(getLocalPlayer(), "Pizza") >= 5 then dxDrawText("PIZZA " a,screenWidth*0.248, screenHeight*0.955, screenWidth*0.0, screenHeight*0.0, tocolor(230, 252, 250, 255), 0.45, "bankgothic", "left", "top", false, false, false, false, false) end end function HandleTheRendering11 ( ) addEventHandler ( "onClientRender", root, createTest1 ) end if getElementData(getLocalPlayer(), "Pizza") >= 11 then dxDrawText("PIZZA 11" a,screenWidth*0.248, screenHeight*0.955, screenWidth*0.0, screenHeight*0.0, tocolor(230, 252, 250, 255), 0.45, "bankgothic", "left", "top", false, false, false, false, false) end end function HandleTheRendering11 ( ) addEventHandler ( "onClientRender", root, createTest1 ) end if getElementData(getLocalPlayer(), "Pizza") >= 16 then dxDrawText("PIZZA 16" a,screenWidth*0.248, screenHeight*0.955, screenWidth*0.0, screenHeight*0.0, tocolor(230, 252, 250, 255), 0.45, "bankgothic", "left", "top", false, false, false, false, false) end end function HandleTheRendering11 ( ) addEventHandler ( "onClientRender", root, createTest1 ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering11 ) Understand now? If I have 16 Pizzas will appear dxDrawText all, but I want to appear only the last addEventHandler ( "onClientRender", root, function ( ) local screenWidth, screenHeight = guiGetScreenSize ( ) local Pizza = getElementData ( localPlayer,'Pizza' ) if Pizza and Pizza >= 5 and Pizza <= 12 then dxDrawText("PIZZA ",screenWidth*0.248, screenHeight*0.955, screenWidth*0.0, screenHeight*0.0, tocolor(230, 252, 250, 255), 0.45, "bankgothic", "left", "top", false, false, false, false, false) end end )
-
You can simply check that if player have 5 or less as you're doing and check if the player have 12 and less .
-
Can you please post the whole function because i can't understand that source and getLocalPlayer () -.- You're trying to set the 'Pizza' Data to how?
-
-- Client Side 'onClientGUIClick' -- Event addEventHandler triggerServerEvent -- Server Side getPlayersInTeam getTeamFromName outputChatBox
-
انا تحققت انة الترايلر موجود وانة المنت يفضل تتحقق تفادياً للأخطاء .
-
الزر اللي بيتقفل لمده 5 ثواني وهو MyButton^
-
addEventHandler ( 'onClientGUIClick',MyButton, function ( ) outputChatBox ( '* The Button Was Clicked!' ) guiSetEnabled ( source,false ) setTimer ( guiSetEnabled,5000,1,source,true ) end,false )
-
تقدر تستخدم هذي اسهل لك مع التايمر واسرع .. guiSetEnabled setTimer addEventHandler 'onClientGUIClick' -- The Event!
-
صح وسوي متغيير تتحقق بانة مضغوط الزر قبل الوقت اللي بالتايمر ولالا .
-
مثآل بسيط و الكود غير كامل فقط مثآل بسيط .. لـ التوضيح .. gVehicle = { gTruck = { }, gTrailer = { }, } local gMarker = createMarker ( x,y,z ) addEventHandler ( 'onMarkerHit',gMarker, function ( gPlayer ) if getElementType ( gPlayer ) == 'player' and not isPedInVehicle ( gPlayer ) then if gVehicle.gTruck [ gPlayer ] and isElement ( gVehicle.gTruck [ gPlayer ] ) then return destroyElement ( gVehicle.gTruck [ gPlayer ] ) end if gVehicle.gTrailer [ gPlayer ] and isElement ( gVehicle.gTrailer [ gPlayer ] ) then return destroyElement ( gVehicle.gTrailer [ gPlayer ] ) end gVehicle.gTruck [ gPlayer ] = createVehicle ( 403,x+math.random ( 1,10 ),y,z ) gVehicle.gTrailer [ gPlayer ] = createVehicle ( 435,0,0,0 ) attachTrailerToVehicle ( gVehicle.gTruck [ gPlayer ],gVehicle.gTrailer [ gPlayer ] ) warpPedIntoVehicle ( gPlayer,gVehicle.gTruck [ gPlayer ] ) outputChatBox ( '* You have get a truck & trailer!!',gPlayer,0,255,0 ) end end ) addEventHandler ( 'onTrailerDetach',root, function ( truck ) local gPlayer = getVehicleController ( truck ) if truck == gVehicle.gTruck [ gPlayer ] and gVehicle.gTrailer [ gPlayer ] and isElement ( gVehicle.gTrailer [ gPlayer ] ) then outputChatBox ( '* The Trailer Was Detached From The Truck!',gPlayer,255,0,0 ) end end )
-
اذا كانت الداتا للآعـب نفسه استخدم الفنكشن اللي سبق وعطاك ايـاه للـقـائد : getVehicleController()
-
He's saying that some of your code's was totally wrong.
-
Line 6 > setElementArmour ( p, 100 ); To setPedArmor ( p, 100 );
-
عند تسجيل الدخول فية بارتمنت خاص بالاكاونت ماله داعي تستدعي وتلف وتدور .. بالنسبة لـ استعاده التيم للاعب لو تتحقق انة التيم موجود في السيرفر اصلاً يكون أفضل تجنباً للـآخطــاء ..
-
حشيش؟ ----- بالنسبة لـك ي رورو .. اذا تستخدم اي مخرج ثاني للشات فـ اعلم انة السبب مثلاً : تاج باستخدام الحدث .. منع كلمات السب باستخدام الحدث .. ^ فهمت؟
-
فية اخطاء بسيطة .. تحفظ التيم نفسة ماراح تقدر تسترجعه وكيف بتتتعرف عليه ^ احفظ اسم التيم واسترجعه وجيب التيم من اسمة .. مثال بسيط : addCommandHandler ( 'gSave', function ( gPlayer ) local gAcc = getPlayerAccount ( gPlayer ) if gAcc and not isGuestAccount ( gAcc ) and getPlayerTeam ( gPlayer ) then setAccountData ( gAcc,'gTeam',getTeamName ( getPlayerTeam ( gPlayer ) ) ) outputChatBox ( '* Your Team Was Saved',gPlayer,255,255,0 ) end end ) addCommandHandler ( 'gRestore', function ( gPlayer ) local gAcc = getPlayerAccount ( gPlayer ) if gAcc and not isGuestAccount ( gAcc ) then local gTeamName = getAccountData ( gAcc,'gTeam' ) if gTeamName then setPlayerTeam ( gPlayer,getTeamFromName ( tostring ( gTeamName ) ) ) outputChatBox ( '* Your Team Was Restored',gPlayer,0,255,0 ) end end end )
-
حاول و ان شاء الله مايقصرون الشباب ..