PaiN^
Members-
Posts
2,258 -
Joined
-
Last visited
Everything posted by PaiN^
-
هذه هي مشكلتي مني عارف ازبط الوضع عشان كذا أقولك
-
لو سمحتوا وضحوا لي الخطأ وين marker = createMarker( 849.59246826172, -2042.9193115234, 12.8671785, "cylinder", 1.5, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", marker function ( source ) if ( getElementModel ( source ) == "player" ) and ( getElementModel ( source ) ~= 0 ) then setPedSkin ( source, 0 ) outputChatBox( "!! تم تغير الشخصية بنجاح", source, 210, 0, 0, true ) else outputChatBox( "", source, 210, 0, 0, false ) end end )
-
شوف يالحبيب يا انك تقتل اللي شخصيته غير يا ان اللي يدخل تتغير شخصيته الإثنين مع بعض مني قادر أجيبهم أو يفيدك واحد من الأخوان
-
ما فهمت الطلب الثاني بس اللي يغير الشخصية تفضل marker = createMarker( X, Y, Z, "cylinder", size, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", marker function ( ) if ( getElementType ( source ) == "player" ) then setPedSkin ( source, ID ) outputChatBox( "!! تم تغير الشخصية بنجاح", source, 210, 0, 0, true ) end ) ID حط رقم الشخصية بدل
-
Well, can you please fix it ? I really want to know how !!
-
WTF is this? This is me making mistakes to learn
-
آآآححححح ما انتبهت بس لو في شي ثاني يا ليت تقولي
-
أتوقع كذا !! غير مجرب -- Server side : addEventHandler( "onPlayerLogin", resourceRoot, function ( ) guiCreateStaticImage( 20, 200, 100, 100, "image1.png", true ) guiCreateStaticImage( 20, 200, 100, 100, "image2.png", true ) guiCreateStaticImage( 20, 200, 100, 100, "image3.png", true ) guiSetVisible( "image1.png", true ) guiSetVisible( "image2.png", true ) guiSetVisible( "image3.png", true ) end ) addEvent( "Pic1", true ) addEventHandler( "Pic1", root, function ( ) if ( getElementType ( source ) == "player" ) then spawnPlayer( source, X, Y, Z, 0, ID, 0, 0, Red ) giveWeapon( source, ID, 200 ) end end ) addEvent( "Pic2", true ) addEventHandler( "Pic2", root, function ( ) if ( getElementType ( source ) == "player" ) then spawnPlayer( source, X, Y, Z, 0, ID, 0, 0, Red ) giveWeapon( source, ID, 200 ) end end ) addEvent( "Pic3", true ) addEventHandler( "Pic3", root, function ( ) if ( getElementType ( source ) == "player" ) then spawnPlayer( source, X, Y, Z, 0, ID, 0, 0, Red ) giveWeapon( source, ID, 200 ) end end ) -- Client side : addEventHandler('onClientGUIClick', resourceRoot, function() if ( localPlayer == image1.png ) then triggerServerEvent ( "Pic1", localPlayer ) elseif ( localPlayer == image2.png ) then triggerServerEvent ( "Pic2", localPlayer ) elseif ( localPlayer ==image3.png ) then triggerServerEvent ( "Pic3", localPlayer ) end end ) إذا كان شغال السطور من 6 إلى 11 راح تحط image.png = PNG إسم الصورة ( طبعا 1 الصورة الأولى و 2 الصورة الثانية و3 الصورة الثالة ) لآزم تكون بصيغة بنق السطر 19 راح تحط X = الإحداثي إكس Y = الإحداثي واي Z = الإحداثي زد ID = رقم الشخصية Red = إسم الفريق والسطر 20 راح تحط ID = رقم الاي دي حق السلاح ونفس الخطوات في السطور 29 و 30 و 39 و 40 أخر شي في السطور 49,51,50 راح تحط نفس أسماء الصور إلي حطيتها في السطور من 6 إلى 11 وأتمنى تصحيح الأخطاء من المحترفين إن وجدت عشان لا يتعب خوينا عالفاضي
-
Here try this one : local playerBlipRoot = createElement( "playerBlipRoot", "playerBlipRoot" ) addEventHandler("onClientResourceStart", root, function resourceStart() for _, player in ipairs( getElementsByType ( "player" ) ) do if player == localPlayer then local r,g,b = getTeamColor( getPlayerTeam ( player ) ) local blip = createBlipAttachedTo( player, 0, 2, r,g,b, 255, 1 ) setElementParent(blip, playerBlipRoot) end end end ) function playerJoin() local r,g,b = getTeamColor(getPlayerTeam(source)) local blip = createBlipAttachedTo(source, 0, 2, r,g,b, 255, 1) setElementParent(blip, playerBlipRoot) setTimer(updateBlipColor, 1500, 1, blip) end addEventHandler("onClientPlayerJoin", root, playerJoin) function playerQuit() for _, blip in ipairs(getElementChildren(playerBlipRoot)) do if getElementAttachedTo(blip) == source then destroyElement(blip) end end end addEventHandler("onClientPlayerQuit", root, playerQuit) function updateBlipColor ( player ) local attachedblip = getElementAttachedTo ( player ) if ( attachedblip ) then local r,g,b = getTeamColor ( getPlayerTeam( player ) ) setBlipColor(attachedblip, r,g,b, 255) end end setTimer( updateBlipColor, 1000, 0 )
-
NOT TESTED !! if detectmethod == "team" then local copteam = get( "legalsystem.Copteam" ) local thisTeam = getPlayerTeam( thePlayer ) if thisTeam ~= false then if thisTeam == getTeamFromName( copteam ) then setElementParent ( thePlayer, kingCOP ) else setElementParent ( thePlayer, kingCIV ) elseif thisTeam == getTeamFormName ( TheName ) then setElementParent ( thePlayer, kingCOP ) else setElementParent ( thePlayer, kingCIV ) end end end Hope it works
-
Search in the community, You'll find some already modified weapon sounds there !!
-
It says in Wiki : [ createBlibAttchedTo ] ( When using optional arguments, you must supply all arguments before the one you wish to use ), You didn't in lines 7 and 16 !! + local blib is repeated twice, You should try making it out of the function body !! i don't no if what i'm saying is right, but i hope so ..
-
I think the reason is that the first 2 functions aren't attached to any event or command handler, And there is more than one function witch have the same name ( lines 15, 57, 68 and 78 ) . still i'm not an expert so it could be something else
-
Try This nameTable = {} local screenX, screenY = guiGetScreenSize() local nameTags = {} function nameTable.Create(player) nameTags[player] = true end function nameTable.Delete(player) nameTags[player] = false end addEventHandler("onClientRender", getRootElement(), function() for i, player in ipairs(getElementsByType("player")) do if isElement(player) then if player ~= getLocalPlayer() then setPlayerNametagShowing(player, false) if not nameTags[player] then nameTable.Create(player) end end end end end ) local cameraX, cameraY, cameraZ = getCameraMatrix() for thePlayer in pairs(nameTags) do while true do if not isElement(player) then break end if getElementDimension(player) ~= getElementDimension(getLocalPlayer()) then break end local playerX, playerY, playerZ = getElementPosition(player) if processLineOfSight(cameraX, cameraY, cameraZ, playerX, playerY, playerZ, true, false, false, true, false, true) then break end local distance3D = getDistanceBetweenPoints3D(cameraX, cameraY, cameraZ, playerX, playerY, playerZ) if distance3D <= 60 then local worldX, worldY = getScreenFromWorldPosition(playerX, playerY, playerZ + 0.95, 0.06) if not worldX or not worldY then break end dxDrawText(getPlayerName(player), worldX, worldY - 0.3, worldX, worldY - 0.3, tocolor(0, 0, 0, 255), 3, "default", "center", "bottom", false, false, false) dxDrawText(getPlayerName(player), worldX, worldY - 0.3, worldX, worldY - 0.3, tocolor(255, 224, 128, 220), 3, "default", "center", "bottom", false, false, false) end end end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() for i, player in ipairs(getElementsByType("player")) do if player ~= getLocalPlayer() then nameTable.Create(player) end end end ) addEventHandler("onClientPlayerJoin", getRootElement(), function() if source == getLocalPlayer() then return end setPlayerNametagShowing(source, false) nameTable.Create(source) end ) addEventHandler("onClientPlayerQuit", getRootElement(), function() nameTable.Delete(source) end )
-
تسلمـوا 3nAd + Mr.Pres[T]ege وبالنسبة للإفنت أنا غلطت مع العجلة لكني أعرف كيف تنكتب
-
أتوقع كذا GUIEditor = { memo = {}, button = {}, label = {}, window = {}, } local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow(122, 122, 433, 288, "TIME By sadiq v.1", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(51, 38, 79, 91, "", false, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(43, 39, 98, 104, "", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(43, 39, 98, 104, "", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(184, 40, 97, 99, "", false, GUIEditor.window[1]) GUIEditor.label[2] = guiCreateLabel(33, 238, 144, 47, "", false, GUIEditor.window[1]) GUIEditor.label[3] = guiCreateLabel(0, -23, 168, 85, "", false, GUIEditor.label[2]) GUIEditor.memo[1] = guiCreateMemo(39, 220, 124, 59, "", false, GUIEditor.window[1]) addEventHandler( "onClintGUIClick", root function Plaece1 ( ) if ( source == GUIEditor.button[1] ) then setElementPosition( source, X, Y, Z ) elseif ( source == GUIEditor.button[2] ) then setElementPosition( source, X, Y, Z ) end end ) والله أعلمـ
-
LoooooL !! طيب ممكن تصححها أخوي حسن لآهنت
-
هذا هو كود الفريز ( !! لمـ يجرب بعد ) local Players = getElementsByType ( "player" ) addEventHandler( "onClientGUIClick", root, function FreezButton ( ) if ( source == GUIEditor.button[19] ) then setElementFrozen( Players, true ) end end ) setTimer( FreezButton, 60000, 1 ) حط رقم الزر بدل 19 + حط وقت الفريز في السطر 10 بدل 60000 ( يعني الوقت إللي تبغى اللاعبين يتجمدوا فيه ), طبعا القوت ينقاس بالمليسكند يعني بجزء من الثانية بالعربي 1000 mls = 1 s ألف ملي سكند تساوي ثانية واحدة الرقم إللي أنا حاطه يساوي دقيقة وإن شاء الله يكون الكود شغال
-
!! مدري أتوقع كذا صح addEventHandler( "onClientGUIClick", root, function SuperManButton( ) if ( source == GUIEditor.button[18] ) then setElementData( source,"SuperMan", SuperManButton ) triggerServerEvent ( "SuperMan", getLocalPlayer() ) end end ) setTimer ( SuperManButton, 60000, 1 ) مع الرغم إني شاك في صحة الموضوع
-
صح اني مو خبير بس الأخطاء واضحة زيي عين الشمس
