-
Posts
2,711 -
Joined
-
Days Won
42
Everything posted by Abdul KariM
-
Client : --client cwm = createMarker( 1983.65601, -2413.86963, 12.54688, "cylinder", 2, 150, 0, 75, 255 ) --this creates the marker GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.2726,0.3275,0.3186,0.4537,"(Weapon Factory)",true) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Memo[1] = guiCreateMemo(151,51,199,46,"On button click you will w\nait for 20 second to create M4",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Memo[2] = guiCreateMemo(151,99,202,46,"On button click you will wait for 20 second to create AK-47",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Button[1] = guiCreateButton(16,59,130,41,"100M4 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(15,105,130,41,"100AK-47 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(17,152,130,41,"18 Gernades for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[3] = guiCreateMemo(150,148,202,46,"On button click you will wait for 20 second to create Gernade",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[3],true) GUIEditor_Memo[4] = guiCreateMemo(150,195,202,46,"On button click you will wait for 20 second to create Rifle",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[4],true) GUIEditor_Button[4] = guiCreateButton(17,197,130,41,"75 Rifle for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[5] = guiCreateMemo(150,243,202,46,"On button click you will wait for 20 second to create Sniper",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[5],true) GUIEditor_Button[5] = guiCreateButton(18,246,130,41,"75 Sniper for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[6] = guiCreateMemo(151,290,202,46,"On button click you will wait for 20 second to create UZI",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[6],true) GUIEditor_Button[6] = guiCreateButton(20,293,130,41,"200 UZI for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[7] = guiCreateMemo(150,337,202,46,"On button click you will wait for 20 second to create C.shotgun",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(18,340,130,41,"200 C.shotgun for 150$",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(24,30,324,20,"Regards,(T-RPG)ProMax",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],150,0,150) GUIEditor_Button[11] = guiCreateButton(298,20,55,26,"Close",false,GUIEditor_Window[1]) --creates the GUI function ToggleCWMMenu ( hit ) if ( hit and hit == localPlayer ) then if eventName == "onClientMarkerHit" then guiSetVisible ( GUIEditor_Window[1],true ) showCursor ( true ) showChat ( false ) showPlayerHudComponent("weapon", false) showPlayerHudComponent("radar", false) elseif eventName == "onClientMarkerLeave" then guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showPlayerHudComponent("weapon", true) showPlayerHudComponent("radar", true) -- shows the chat and i don't know what about the hud end end end addEventHandler("onClientMarkerHit",cwm,ToggleCWMMenu) addEventHandler("onClientMarkerLeave",cwm,ToggleCWMMenu) addEventHandler ('onClientGUIClick',GUIEditor_Button[11], -- that was the closing button function ( ) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showPlayerHudComponent("weapon", true) showPlayerHudComponent("radar", true) end,false ) --rest of buttons addEventHandler ('onClientGUIClick',GUIEditor_Button[1], function () guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) triggerServerEvent ("GiveM4",localPlayer) end,false ) local sx , sy = guiGetScreenSize ( ) --then the second part function drawStaticBar() dxDrawRectangle((sx/2)-270, (sy/2)-22, 540.0, 44.0, tocolor(255,197,0,150), false) dxDrawRectangle((sx/2)-265, (sy/2)-16, 530.0, 33.0, tocolor(0,0,0,250), false) end function drawLoadingBar() if (tonumber(createPercent) >= 100) then removeEventHandler("onClientRender", root, drawStaticBar) removeEventHandler("onClientRender", root, drawLoadingBar) showCursor(false) guiSetInputEnabled(false) else dxDrawRectangle((sx/2)-261, (sy/2)-12, tonumber(createPercent)*5.22, 25.0, tocolor(0,0,235,255), true) end dxDrawBorderedText("Creating... "..tostring(createPercent).."%", (sx/2)-145, (sy/2)-15, (sy/2)-1, (sx/2)-5, tocolor(0,255,0,255),1.0,"bankgothic","left","top",false,false,true) end addEvent("creating",true) addEventHandler("creating",root, function (weaponName) name = tostring(weaponName) if isTimer(trainTimer) then killTimer(trainTimer) end createPercent = 0 showCursor(true) guiSetInputEnabled(true) trainTimer = setTimer(function () createPercent = createPercent +1 end, 100, 0) addEventHandler("onClientRender",getRootElement(),drawLoadingBar) addEventHandler("onClientRender",getRootElement(),drawStaticBar) if tonumber(createPercent) >= 100 then showPlayerHudComponent("weapon", true) else showPlayerHudComponent("weapon", false) showPlayerHudComponent("radar", false) end end)
-
reset this code to your code addEvent("creating",true) addEventHandler("creating",root, function (weaponName) name = tostring(weaponName) if isTimer(trainTimer) then killTimer(trainTimer) end createPercent = 0 showCursor(true) guiSetInputEnabled(true) trainTimer = setTimer(function () createPercent = createPercent +1 end, 100, 0) addEventHandler("onClientRender",getRootElement(),drawLoadingBar) addEventHandler("onClientRender",getRootElement(),drawStaticBar) if tonumber(createPercent) >= 100 then showPlayerHudComponent("weapon", true) else showPlayerHudComponent("weapon", false) showPlayerHudComponent("radar", false) end end)
-
Copy a my code again
-
Oh really ? show me a bugs
-
reset server side to this addEvent ('GiveM4',true) addEventHandler ('GiveM4',root, function ( ) if not getPlayerTeam( source ) or getPlayerTeam ( source ) ~= getTeamFromName("Criminal") then return outputChatBox( 'You are not a criminal to create weapons',source,255,0,0 ) end if getPlayerMoney ( source ) >= 150 then setTimer ( giveWeapon , 1000 , 1 , source , 31 , 100 , true ) triggerClientEvent( source ,"creating", source , getWeaponNameFromID ( 31 ) ) takePlayerMoney( source ,150 ) else outputChatBox('You do not have enough money to create this weapon', source , 255, 0, 0 ) end end )
-
Use this function CRC_MAIN( cmd, thePlayer ,who, targetPlayer, sourcePlayer) setTimer ( CRC_MAIN, 10000, 0 ) if thePlayer and ( getPlayerFromName ( thePlayer ) ) then if not ( who ) then return end if not ( sourcePlayer ) or not( getPlayerFromName ( sourcePlayer ) ) then return end local targetPlayer = getPlayerFromPartialName ( who ) local r, g, b = math.random( 255 ), math.random( 255 ), math.random( 255 ) local aPlayer = isPedInVehicle ( targetPlayer ) and getPedOccupiedVehicle ( targetPlayer ) or getPlayerFromName ( thePlayer ) if isPedInVehicle(getPlayerFromName ( thePlayer )) then if targetPlayer then if aPlayer then outputChatBox("#3d87ffCRC By @SpRoXx #FFFFFFThe Player #FFFFFFTrolling!", getPlayerFromName ( sourcePlayer ), 255, 0, 0, true) outputChatBox("#3d87ffCRC By @SpRoXx #FFFFFFif you want to troll someone You've to wait 1 minute, to use the command again.", getPlayerFromName ( sourcePlayer ), 255, 0, 0, true) setVehicleColor(getPedOccupiedVehicle ( targetPlayer ), r, g, b) else outputChatBox("#3d87ffCRC By @SpRoXx #FFFFFFThe Player #FFFFFFis not in a Vehicle.", getPlayerFromName ( sourcePlayer ), 255, 0, 0, true) end else outputChatBox("#3d87ffCRC By @SpRoXx #FFFFFFThe Player #FFFFFFDoesn't exists.", getPlayerFromName ( sourcePlayer ), 255, 0, 0, true) end else outputChatBox("#3d87ffCRC By @SpRoXx #FFFFFFYou must be in a vehicle to troll someone", getPlayerFromName ( sourcePlayer ), 255, 0, 0, true) end end end addCommandHandler("troll", CRC_MAIN) and say player name in f8 ex : troll abdulKarim ali yaser and Please interpreted what want do and Even i give you edit your request
-
مانعطي اكوادك كاملة , اطرح محاولتك وبنصححها لك كلها سطر ومجرد تحقق بسيط
-
حط التحقق هذا بالسطر الاول local playerTeam_ = getPlayerTeam ( localPlayer ) if not ( playerTeam_ ) then return end
-
جرب هالمثال addCommandHandler ( "myTeam" , function ( player ) local playerTeam_ = getPlayerTeam ( player ) or "None" outputChatBox ( playerTeam_ , player , 255 , 255 , 255 ) end ); myTeam اكتب بأف8 None لو كان الاعب بتيم راح يطلع لك تيمه بالشات لو كان ماهب بتيم راح يطلعك
-
طيب يالغالي هذا هو الي فوق getPlayerTeam انت جربه وراح تعرف انه طلبك
-
اخوي الاعب مايصير الا بتيم واحد لاكن اذا قصدك تبي تعرف تيم الاعب استخدم getPlayerTeam هذا الفنكشن راح يرجعلك بتيم الاعب اذا كان بتيم
-
هذي هي طيب كل الي عليك تسوي if ( DoesPlayerHaveTeam ( player , getTeamFromName ( "TeamName" ) ) then طبعا تعرف البلاير وتبدل تيم نيم بأسم التيم الي تبي تتحقق ان الاعب فيه ولاتنسى تحط كود الوظيفة
-
في عندك اكثر من طريقة اما عن طريق getPlayerTeam او عن طريق الفنكشن هذا https://wiki.multitheftauto.com/wiki/IsPlayerInTeam او هذا طبعا انا افضل لك هذا ولك الخيار , بالتوفيق
-
الله يسلمك , ابد دعائك لي يكفيني عن كل هذا
-
الله يعافيك , اجمعين ان شاء الله , وبالخدمة واضافة لذلك لو بغيت تجيب صاحب التيم تسوي كذا getElementData ( getTeamFromName ( "TeamName" ) , "teamowner" ).player بأسم التيم الي تبي تجيب صاحبه TeamName بس بدل واذا بغيت تجيب اسم صاحب التيم فيه طريقتين اسمه قبل مايتغير يعني يوم شرا التيم والي هي الطريقة هذي getElementData ( getTeamFromName ( "TeamName" ) , "teamowner" ).TeamOwner_ والطريقة الثانية تجيب اسمه لو غيره مثلا عن طريق هذي local playerOwner = getElementData ( getTeamFromName ( "TeamName" ) , "teamowner" ).player outputChatBox ( getPlayerName ( playerOwner ) ) بالتوفيق ي رب
-
استبدل السيرفر سايد بهذا addEvent ("Cl",true) addEventHandler ("Cl",root, function ( name , mmnstry , Color ) if getPlayerMoney( source ) >= 50000 then if ( getTeamFromName ( mmnstry ) ) then return outputChatBox ( "The Team Name is Used" , source , 255 , 255 , 255 ) end kkte = createTeam ( mmnstry, unpack ( Color ) ) if ( kkte ) then setPlayerTeam( source , kkte ) setElementData ( kkte , "teamowner", { player = source , TeamOwner_ = name } ) end end end ) وكود فتح النافذة بهذا function OpenWin321() for _ , v in ipairs ( getElementsByType ( "team" ) ) do if ( getElementData ( v , "teamowner" ) and getElementData ( v , "teamowner" ).player == localPlayer ) then if guiGetVisible ( main2 ) then guiSetVisible ( main2, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( main2, true ) showCursor(true) guiSetInputEnabled(true) break end end end end bindKey("F6", "down", OpenWin321) جرب ورد خبر بالتوفيق
-
الله يعافيك ويخليك انسخ السيرفر سايد مره ثانية عدلت عليه خليت الداتا على التيم والقيمة صاحب التيم افضل من انك تحطها على الاعب
-
كلينت : addEventHandler ("onClientGUIClick",root, function ( ) if ( source == buttoncreate ) then local name = getPlayerName ( localPlayer ) local mmnstry = guiGetText ( teamnameedit ) if ( #mmnstry > 1 ) and ( mmnstry ~= "" ) then local ali12 = guiGetText ( teamcoloredit ) if ( ali12:find ( "," ) ) then local Colors = split ( ali12 , "," ) if ( tonumber ( Colors [ 1 ] ) and tonumber ( Colors [ 2 ] ) and tonumber ( Colors [ 3 ] ) ) then triggerServerEvent ( "Cl", localPlayer, name , mmnstry , Colors ) end end end end end ) سيرفر : addEvent ("Cl",true) addEventHandler ("Cl",root, function ( name , mmnstry , Color ) if getPlayerMoney( source ) >= 50000 then if ( getTeamFromName ( mmnstry ) ) then return outputChatBox ( "The Team Name is Used" , source , 255 , 255 , 255 ) end kkte = createTeam ( mmnstry, unpack ( Color ) ) if ( kkte ) then setPlayerTeam( source , kkte ) setElementData ( kkte , "teamowner", name ) end end end ) طبعا بالنسبة لايدت الالوان اكتبها بـ هالشكل : 255,255,255 طبعا مثال هذا وانت غير الارقام للون الي تبي واضفت لك بعض التحققات وبالتوفيق ان شاء الله
-
عندك اخطاء كثيرة ممكن تقولي وش الي تبي تسويه
-
طيب كيف طريقة اخذ النيترو ؟ باك اب ولا ماركر ولا وش
-
شف يالغالي الطريقة مره سهلة استخدم الفنكشن هذا https://wiki.multitheftauto.com/wiki/GetPlayersByData وسوي لوب عليه بأسم القروب الي تبيه راح يرجعلك بكل الاعبين الي في القروب والي فهمته منك لو احد لاعبين القروب اشترى سلاح مايقدر ياخذه اي لاعب بالقروب , وياليت لو توضح لنا شويات بالتوفيق
-
عليكم السلام حاول تشرح بطريقة افضل , مافهمت شي صراحة
-
العفو , حياكك
-
تأكد انك حاط كود الوظيفة بالملف function dxDrawCircle( posX, posY, radius, width, angleAmount, startAngle, stopAngle, color, postGUI ) if ( type( posX ) ~= "number" ) or ( type( posY ) ~= "number" ) then return false end local function clamp( val, lower, upper ) if ( lower > upper ) then lower, upper = upper, lower end return math.max( lower, math.min( upper, val ) ) end radius = type( radius ) == "number" and radius or 50 width = type( width ) == "number" and width or 5 angleAmount = type( angleAmount ) == "number" and angleAmount or 1 startAngle = clamp( type( startAngle ) == "number" and startAngle or 0, 0, 360 ) stopAngle = clamp( type( stopAngle ) == "number" and stopAngle or 360, 0, 360 ) color = color or tocolor( 255, 255, 255, 200 ) postGUI = type( postGUI ) == "boolean" and postGUI or false if ( stopAngle < startAngle ) then local tempAngle = stopAngle stopAngle = startAngle startAngle = tempAngle end for i = startAngle, stopAngle, angleAmount do local startX = math.cos( math.rad( i ) ) * ( radius - width ) local startY = math.sin( math.rad( i ) ) * ( radius - width ) local endX = math.cos( math.rad( i ) ) * ( radius + width ) local endY = math.sin( math.rad( i ) ) * ( radius + width ) dxDrawLine( startX + posX, startY + posY, endX + posX, endY + posY, color, width, postGUI ) end return true end