Jump to content

Max+

Members
  • Posts

    1,363
  • Joined

  • Last visited

Everything posted by Max+

  1. he can use a timer to check isPlayerMuted then addEvent Back . if not isPlayerMuted then ---remove it again
  2. no my code if you try to damage the object then your health will be -2 every time you damage the object ..
  3. ---ClientSide function testing() local px, py, pz, tx, ty, tz, dist px, py, pz = getCameraMatrix( ) for _, v in ipairs( getElementsByType 'player' ) do tx, ty, tz = getElementPosition( v ) dist = math.sqrt( ( px - tx ) ^ 2 + ( py - ty ) ^ 2 + ( pz - tz ) ^ 2 ) if dist < 32.0 then if isLineOfSightClear( px, py, pz, tx, ty, tz, true, false, false, true, false, false, false,localPlayer ) then local sx, sy, sz = getPedBonePosition( v, 5 ) local x,y = getScreenFromWorldPosition( sx, sy, sz + 0.30 ) local x1,y1 = getScreenFromWorldPosition( sx, sy, sz + 0.35 ) local r,g,b = getPlayerNametagColor(localPlayer) scale = 0.65 if x then if getElementData(v,"playermuted") == 1 then dxDrawText( "Muted", x, y, x, y, tocolor(r, g, b), scale + ( 15 - dist ) * 0.02, "bankgothic" ) elseif getElementData(v,"playermuted") == 0 then setTimer(function() removeEventHandler ("onClientRender",root,testing) end, 1000, 1) end end end end end end addEventHandler("onClientRender",root,testing)
  4. Nice Job Mate_ Can you Please Send me the source of BaseMode #Beta 2 I really Need it For adding stuff to my GameMode ..
  5. بساعدك في الكود الاول ^ --- كلينت start = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Dance!", true ) stop = guiCreateButton( 1.7, 1.1, 0.3, 0.2, "Stop!", true ) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == start ) then setPedAnimation ( localPlayer, "DANCING", "dnce_m_b") elseif ( source == stop ) then setTimer (function () setPedAnimation (localPlayer, false) end, 1000, 1) end end )
  6. ---ClientSide addEventHandler ( 'onClientObjectDamage', root, function ( _, attacker ) if ( getElementType ( attacker ) == 'player' ) then setElementHealth ( attacker, getElementHealth(attacker) - 5 ) outputChatBox ( 'You Lost -2 Health For Damaging the Object', attacker, 255, 0 , 0 ) end end )
  7. iam sure my code is Correct and will work fine , post the other code if you have one , or Send it Pm .
  8. 'Event' : [url=https://wiki.multitheftauto.com/wiki/OnClientObjectDamage]https://wiki.multitheftauto.com/wiki/On ... jectDamage[/url] setElementHealth --- to players if they damage the Object
  9. Copy My Post Again and Make sure it's ClientSide =================== and this Code is ServerSide , addEventHandler("onPlayerUnmute",root, function ( ) triggerClientEvent ( source , 'secondFunction', source ) end )
  10. local maker = createMarker to make a marker if you hit the marker and your not in a vehicle then show the gui window to Select Cars . . .
  11. use , setElementData --- to set paint data to the car getElementData --- to get the paint data from the car -----if get the data then setVehiclePaintjob
  12. Try This , --- ClientSide addEvent('firstFunctionn', true ) addEventHandler ( 'firstFunctionn', root, function ( ) addEventHandler("onClientRender",root,test) setElementData(localPlayer,"apple",1) end ) addEvent ( 'secondFunction', true ) addEventHandler ( 'secondFunction', root, function ( ) setElementData(localPlayer,"apple",0) setTimer(removeEventHandler,1000,1,"onClientRender",getRootElement(),test) end ) Edited @
  13. Explain Better Please what do you want to do .
  14. what's your problem Exactly Please Explain Better .
  15. Max+

    Scrollpane

    no , i mean this guiSetSize
  16. Max+

    Scrollpane

    did you tryed this ? guiSetSize
  17. والله مدري وش تحصل ؟ بالله لاتجلطني عطيت موضوع كامل وكود جاهز ويقول مالقيت شي عالعموم هاذا الكلينت GUIEditor = { button = {}, staticimage = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.staticimage[1] = guiCreateStaticImage(0.25, 0.13, 0.52, 0.67, ":المود/D.png", true) GUIEditor.button[1] = guiCreateButton(15, 296, 259, 75, "login / تسجيل الدخول", false, GUIEditor.staticimage[1]) GUIEditor.button[2] = guiCreateButton(15, 426, 259, 75, "register /تسجيل حساب جديد", false, GUIEditor.staticimage[1]) GUIEditor.edit[1] = guiCreateEdit(15, 67, 341, 30, "", false, GUIEditor.staticimage[1]) GUIEditor.edit[2] = guiCreateEdit(15, 181, 341, 30, "", false, GUIEditor.staticimage[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.staticimage[2] = guiCreateStaticImage(366, 36, 330, 315, ":المود/4.png", false, GUIEditor.staticimage[1]) GUIEditor.staticimage[3] = guiCreateStaticImage(630, 460, 20, 21, ":المود/1.png", false, GUIEditor.staticimage[1]) GUIEditor.staticimage[4] = guiCreateStaticImage(548, 457, 22, 24, ":المود/2.png", false, GUIEditor.staticimage[1]) end ) addEventHandler("onClientRender", root, function() dxDrawText(" username /اسم المستخدم", 356, 148, 690, 167, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(" password / كلمة المرور", 375, 259, 670, 279, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(" login / register panel V.2 By [iMr]MiDo", 498, 101, 902, 120, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) dxDrawText(" By [iMr]MiDo ", 888, 483, 1039, 534, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, true, false, false) end ) addEventHandler("onClientGUIClick",resourceRoot, function () local user = guiGetText(GUIEditor.edit[1]) local pass = guiGetText(GUIEditor.edit[2]) if ( source == GUIEditor.button[1] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("Login",localPlayer,user,pass) end elseif ( source == GUIEditor.button[2] ) then if string.len(user) > 0 and string.len(pass) > 0 then triggerServerEvent("Register",localPlayer,user,pass) end end end ) تقدر تدبر نفسك بالسيرفر . . .
  18. https://forum.multitheftauto.com/viewtopic.php?f ... &start=255
  19. اكيد ياذكي لان مافيه افنت للسكربت اصلا ضيف افنت عن الضغط على شي او كوماند تكتبه وتطلع له الرسالة . .
  20. addCommandHandler ( 'lock', function ( ) setElementData ( localPlayer, 'IsWarpLocked', true ) end ) addCommandHandler ( 'unlock', function ( ) setElementData ( localPlayer, 'IsWarpLocked', false ) end ) ---- function nowarp () if ( getElementData ( localPlayer, 'IsWarpLocked' == true )) then outputChatBox("#00FF00[تم اغلاق الأنتقال إليك]",255,255,255,true) elseif ( getElementData (localPlayer, 'IsWarpLocked' == false )) then outputChatBox("#00FF00[تم فتح الأنتقال إليك]",255,255,255,true) end end
  21. طيب جرب تغير getElementsbyType('player' ) غير player الى projectile
  22. جرب ذا , -- Client -- local sX, sY = guiGetScreenSize ( ) img = guiCreateStaticImage ( ( sX - 350 ) / 2, ( sY - 300 ) / 2, 330, 210, "img.png", false ) guiSetVisible ( img, false ) addEventHandler ( "onClientPlayerWeaponFire", localPlayer, function ( weapon, _, _, hitX, hitY ) if ( weapon == 16 )then for _, v in ipairs ( getElementsByType ( "player" ) ) do local pX, pY = getElementPosition ( v ); local Distance = math.ceil ( getDistanceBetweenPoints2D ( hitX, hitY, pX, pY ) ) if Distance <= 15 then guiSetVisible ( img, true ); setTimer ( guiSetVisible, 3000, 1, img, false ); end end end end ); امسح السيرفر اللي عندك #
  23. i know but it's still bug why do we have to make a script for fixing this issue ? it's the admin panel i think or the mta program . because mta developers don't have time to fix it, and it's extremely easy to fix this problem by yourself i know that .. . but not every one is a scripter , i can fix it others can't . .
  24. i know but it's still bug why do we have to make a script for fixing this issue ? it's the admin panel i think or the mta program .
×
×
  • Create New...