Jump to content

MrKAREEM

Members
  • Posts

    621
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by MrKAREEM

  1. health = getElementHealth (getPedOccupiedVehicle(localPlayer)) local health = (math.max(health - 250, 0)/750)*100 dxDrawImage ( (x/nX)*screenWidth*13.2, (y/nY)*screenHeight*11.0, (x/nX)*screenWidth*1.1, (y/nY)*screenHeight*1, "circle.png",0,0,0,tocolor(255,255,255,200)) --dxDrawImage ( (x/nX)*screenWidth*13.55, (y/nY)*screenHeight*11.1, (x/nX)*screenWidth*0.4, (y/nY)*screenHeight*0.4, "heart1.png",0,0,0,tocolor(255,255,255,150)) dxDrawText(""..math.ceil(health).."", 0.968*screenX, 1.50*screenY, 0.75104166666667*screenX, 0.26018518518519*screenY, tocolor(255, 255, 255, 150), 1.5, "defaut", "center", "center", false, false, true, false, false) dxDrawText("HP",0.968*screenX, 1.55*screenY, 0.75104166666667*screenX, 0.26018518518519*screenY, tocolor(255, 255, 255, 150), 1.5, "defaut", "center", "center", false, false, true, false, false) --------------------------------------------------------------------------- end end addEventHandler ( "onClientRender", root, hud ) --------------------------------------------------------------------------- try this
  2. GetElementPosition CreateBlip
  3. AddCommandHandler EngineRestoreModel e fazer uma mesa com skins id
  4. it works with me? createMarker(1601, 1212, 12.434, "cylinder", 15, 10, 244, 23, 255) function isAmElement(element) if isElement( element ) then return outputChatBox('type:'..type(element)) end return false end function onHit(e) if isAmElement(e) then outputChatBox('hit:'..getElementType(e)) end end addEventHandler("onMarkerHit", root, onHit) edit : i tried your function it works with me
  5. BindKey ExecuteCommandHandler مثال : function money( ) executeCommandHandler('فلوس') end bindKey('F10','down',money)
  6. mostrar seus códigos ou mostrar se houve erros de depuração?
  7. meu código funciona se você obtiver os IDs do seu sistema VIP e substituí-los pelos IDs na tabela ids = {592,577,511,425} -- altere os IDs com seus IDs de carros vip
  8. create your custom animation using 3ds max then use these functions for importing,replacing ect EngineLoadIFP load an IFP file EngineReplaceAnimation replace your customs animations with another gta animations you can do the knock out using these functions : OnClientPlayerDamage when the player damaged GetElementHealth check if his health < 10 so set his health to 100 for the knock out health SetPedAnimation set the animation to him SetTimer make timer for decreasing his health by getElementHealth - 10 SetElementHealth change the player health if you want to make a revive system you need these functions : GetDistanceBetweenPoints3D get the distance between two 3 dimensional points BindKey bind a key SetTimer make a timer for revive the player or make your custom progress bar SetPedAnimation to let the player move freely again SetElementHealth change the player health to 75% or any value you want KillTimer to kill any existing timers. hope i helped you !
  9. bool setPedAnimation ( ped thePed [, string block = nil, string anim = nil, int time = -1, bool loop = true, bool updatePosition = true, bool interruptable = true, bool freezeLastFrame = true, int blendTime = 250, bool retainPedState = false ] ) block: o nome do bloco de animação. anim: o nome da animação dentro do bloco. time: quanto tempo a animação será executada em milissegundos. loop: indica se a animação será ou não repetida. updatePosition: irá alterar as coordenadas reais do ped de acordo com a animação. Use isso para, por exemplo animações ambulantes. interruptable: se definido como falso, outras tarefas não poderão interromper a animação. Definir isso como 'false' também dá a essa função mais poder de substituir outras animações em execução. Por exemplo, agachar-se após um salto pode ser encerrado. freezeLastFrame: se definido como true após a animação, o último quadro será congelado; caso contrário, a animação será encerrada e os controles retornarão. blendTime: quanto tempo a animação será misturada com a anterior em milissegundos. retainPedState: restaurará a tarefa que estava sendo executada antes de chamar esta função. Útil para restaurar a tarefa de agachamento após o término da animação. Isso pode ser estendido no futuro para apoiar outros estados / tarefas. este é um pequeno exemplo que faz o jogador se estabelecer e não repetir o anime ou mudar de posição : function toggleSit(thePlayer) if not getElementData(thePlayer, "sitting") then setPedAnimation(thePlayer, "ped", "seat_down", -1, false, false, false, false) setElementData(thePlayer, "sitting", true) else -- Se você usar novamente este comando, seu personagem se levantará setPedAnimation(thePlayer) removeElementData(thePlayer, "sitting") end end addCommandHandler("sit", toggleSit)
  10. gerente de anim para excluir ou renomear anim ou mostrar apenas anim se você quiser um editor avançado, use 3ds max e crie animações incríveis
  11. see this topic it will help you
  12. local customBlockName = "myNewBlock" -- load the IFP file local IFP = engineLoadIFP( "parkour.ifp", customBlockName ) -- informe-nos se o IFP falhou ao carregar if not IFP then outputChatBox( "Failed to load 'parkour.ifp'" ) end -- substituir a animação engineReplaceAnimation( localPlayer, "ped", "weapon_crouch", customBlockName, "HandPlant" ) e no arquivo de mapa será assim <animation id="Dança 14" block="myNewBlock" code="HandPlant" /> gtaanimmngr.rar
  13. aqui está o nome da animação que você deseja : [[ carry ]] usar [[ SetPedAnimation ]] to define an animation for the ped e você pode usar [[ SetPedControlState ]] para mover o ped para a frente ou para trás e ect neste exemplo cria um ped e faz com que ele se mova para frente : function newPed() local x, y, z = getElementPosition(localPlayer) local ped = createPed(0, x + 1, y, z) if ped then setPedControlState(ped, "forwards", true) end end addCommandHandler("ped", newPed) espero ter ajudado você ?
  14. használja ezt a funkciót : GetWeaponNameFromID visszaadja a fegyver nevét az azonosítójából, vagy hamisat ad vissza, ha az azonosító érvénytelen
  15. eu não sabia o que realmente você está tentando fazer, mas crie uma tabela com o ID do veículo que você deseja bloquear então verifique se o veículo é igual a qualquer id na tabela para cancelar o evento como este : ids = {592,577,511,425} -- Nesta tabela para bloquear alguns aviões, você pode alterar os IDs markerPed = createMarker(-2181.60546875, 709.8701171875, 52.950625, "cylinder", 1, 255, 0, 0, 50) markerVeh = createMarker(-2178.94897, 715.82697, 52.8908, "cylinder", 3.5, 255, 0, 0, 50) function execDesmanche() local vehicle = getVehicleInMarker(markerVeh) if vehicle then if ids[getElementModel(vehicle)] then return outputChatBox('este veículo está bloqueado!',source,255,0,0) end -- isso verifica se o modelo de veículo atual encontrado na tabela, cancele-o com uma mensagem setElementPosition(vehicle, -2185.39893, 703.11169, 53.89063) local price = math.random(5000, 25000) givePlayerMoney(source, price) outputChatBox("Veiculo desmanchado, você ganhou #00ff00"..price.."$", source, 255, 255, 255, true) setTimer(function () setVehicleDoorState(vehicle, 0, 4) setVehicleDoorState(vehicle , 1, 4) setVehicleDoorState(vehicle, 2, 4) setVehicleDoorState(vehicle, 3, 4) setVehicleDoorState(vehicle, 4, 4) setVehicleDoorState(vehicle, 5, 4) setVehicleWheelStates(vehicle, 2, 2, 2, 2) setVehiclePanelState ( vehicle, 4, 3 ) setVehicleLightState(vehicle, 0, 1) setVehicleLightState(vehicle, 1, 1) setVehicleLightState(vehicle, 2, 1) setVehicleLightState(vehicle, 3, 1) setElementHealth(vehicle, 350) setVehicleEngineState( vehicle , false) setTimer(destroyElement, 10000, 1, vehicle) end, 500, 1) else outputChatBox("Nenhum veiculo encontrado!", source, 255, 0, 0, true) end end addEvent("execDesmanche", true) addEventHandler("execDesmanche", root, execDesmanche) divirta-se ?
  16. if you mean places in server list so you need to : Promote your server by buying a top 20 position in the MTA Server Browser for 20 days Price is €12 read more here : toplist
  17. شغل منصق ورائع استمر وبالتوفيق
  18. انا عن نفسي في الاول كنت بفكر الشئ اللي انا هعمله دا محتاج ايه ولحد دلوقتي مفيش مبرمج عارف كل وظائف اللعبة سواء كانت سيرفر او كلينت يوجد شئ اسمه ايفينت ودي احداث منها اشياء تكون بملفات الكلينت واحداث مكانها بالسيرفر كمثال انا لو عاوز ابرمج لوحة لما اضغط علي زرار تقفل مبدأيا اللوحة هتصممها زي مقال احمد فوق هتحتاج سكربت اسمه جوي اديتور دا تحمله عادي بعدين فكر انت لما هتضغط علي الزر او شئ في اللعبة هتبقي مثلا اسمها ايه بالانجليزي خش جوجل واكتب guiclick mta sa لو انت مش حابب تسال كل شوية في المنتدي اعمل الطريقة دي ابحث عن شئ معين ويجيلك كل شئ له علاقة بنتيجة البحث هتلاقي الاحداث الخاصة بالجوي مثال onClientGUIClick -- دا حدث لما يوزر يضغط علي اليمنت وتشتغل علي الجوي اليمنتس OnClientGUIDoubleClick -- حدث لما اليوزر او الشخص يضغط ضغطتين علي شئ من الجوي اليمنتس وتلاقي امثلة عن كل وظيفة محددة طيب بعد مضغطت ؟ عاوز اقفل اللوحة اكتب close window mta sa هتلاقي جابلك كل شئ عن كيفية قفل لوحة سواء كان ناس عملوا موضوع طالبين مساعدة في الشئ دا او الويكي جاب لك الوظيفة نفسها فالوظيفة اسمها guiSetVisible ودي بتتحكم في اظهار اللوحة او اخفائها وهتلاقي امثلة عنها في الويكي انت لو مشيت بالوضع دا وأي شئ يقف معاك تسال هنا في موضوع هتتعلم البرمجة في أقل وقت + أخر شئ شوف شروحات البرمجة هنا في المنتدي يوجد شروحات عن أشياء كثيرة عملها المبرمجين العرب تلقاها في القسم دا دروس في البرمجة
  19. الله يعافيك المشكلة مش في الداتا المشكلة ان لما تستخدم اليمنت داتا علي لوحة ومعاها اليمينتس تانيين مربوطين بيها الداتا بتنطبق علي اللوحة واللي معاها فأنا استخدمت طريقة تانية وعملتها في الويكي yl بالنسبة للقيمة الخاصة ب انا معرفها فوق وهي عبارة عن اليوزر داتا اللي اتضغط عليه فأقدر اجيب الداتا الخاصة بيه مفيش مشكلة بس زي موضحتلك فوق المشكلة ان الاليمنت داتا مش هتظبط علي جوي مربوط بيه اليمنتس تانيين تقدر تشوف الوظيفة بعد التعديل GuiSetStaticImageMovable
  20. اعتذر علي تكرار النشر تم تنبيهي من قبل شخص كام باستخدام الوظيفة وكان بها خطا تم تعديل الخطا function guiSetStaticImageMovable(Element,state) assert(getElementType(Element) == 'gui-staticimage', "Bad argument 1 @ guiSetStaticImageMovable [gui-staticimage expected, got "..getElementType(Element).."]") assert(type(state) == "boolean", "Bad argument 2 @ guiSetStaticImageMovable [boolean expected, got "..type(state).."]") if state == true then state = math.random(1,500) else state = false end return guiSetProperty(Element,"ID",tostring(state)) end function Hold( t,x,y ) if t == "left" and guiGetProperty(source,'ID') ~= '0' and getElementType(source) == 'gui-staticimage' then local lp = Vector2(guiGetPosition(source,false)); lx = {x-lp.x,y-lp.y}; yl = source; end end function Drop( xo, x, y ) if xo ~= "left" then return end yl = nil; end function Move( _, _, x, y ) if yl and getElementData(yl,'Movable') then guiSetPosition(yl,x-lx[1],y -lx[2],false); end end addEventHandler( "onClientGUIMouseDown", getRootElement( ),Hold) addEventHandler( "onClientGUIMouseUp", getRootElement( ),Drop) addEventHandler( "onClientCursorMove", getRootElement( ),Move)
  21. تعديل: تم حل المشكلة وتم تعديلها بالويكي اعتذر علي الخطأ وشكرا علي التنبيه
  22. جرب كدا function guiSetStaticImageMovable(Element,state) assert(getElementType(Element) == 'gui-staticimage', "Bad argument 1 @ guiSetStaticImageMovable [gui-staticimage expected, got "..type(Element).."]") assert(type(state) == "boolean", "Bad argument 2 @ guiSetStaticImageMovable [boolean expected, got "..type(state).."]") return setElementData(Element,'Movable',state) or false end function Hold( t,x,y ) if t ~= "left" or not getElementData(source,'Movable') or getElementType(source) ~='gui-staticimage' then return end local lp = Vector2(guiGetPosition(source,false)); lx = {x-lp.x,y-lp.y}; yl = source; end function Drop( xo, x, y ) if xo ~= "left" then return end yl = nil; end function Move( _, _, x, y ) if yl then guiSetPosition(yl,x-lx[1],y -lx[2],false); end end addEventHandler( "onClientGUIMouseDown", root,Hold) addEventHandler( "onClientGUIMouseUp", root,Drop) addEventHandler( "onClientCursorMove", root,Move) GUIEditor = { button = {}, staticimage = {}, label = {}, memo = {} } local screenW, screenH = guiGetScreenSize() GUIEditor.staticimage[1] = guiCreateStaticImage((screenW - 444) / 2, (screenH - 357) / 2, 444, 357, "TR.png", false) guiSetStaticImageMovable(GUIEditor.staticimage[1],true) GUIEditor.label[1] = guiCreateLabel(1, 5, 443, 17, "LabelNumb1", false, GUIEditor.staticimage[1]) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.button[1] = guiCreateButton(19, 89, 163, 52, "btn1", false, GUIEditor.staticimage[1]) GUIEditor.button[2] = guiCreateButton(250, 89, 163, 52, "btn2", false, GUIEditor.staticimage[1]) GUIEditor.memo[1] = guiCreateMemo(14, 151, 409, 192, "", false, GUIEditor.staticimage[1]) كدة هتشتغل معاك المشكلة من عندي وانا هحلها قريب
×
×
  • Create New...