Jump to content

isa_Khamdan

Members
  • Posts

    484
  • Joined

  • Last visited

Everything posted by isa_Khamdan

  1. Can someone just do it for me I tried many times and I still didn't get how to do it just add the draw text on screen in the script when you get freeze and another time when you get unfreeze that's all I want
  2. so I should have a code in server side & client side? not server alone to do that?
  3. then how can I draw text on screen when you get freeze and unfreeze
  4. Will this works and show the text on screen? addEventHandler ( "onMarkerHit", createMarker ( 1791.537, 656.511, 17.626, 'cylinder', 2.0, 255, 0, 0, 150 ) , function ( hitElement, matchingDimension ) if ( getElementType ( hitElement ) == "vehicle" ) then triggerClientEvent ( thePlayer, "hitElement", getRootElement(), "Frozen" ) else if ( setElementFrozen, false, hitElement, false ) triggerClientEvent ( thePlayer, "hitElement", getRootElement(), "GO" ) setElementFrozen ( hitElement, true ) setTimer ( setElementFrozen, 5000, 1, hitElement, false ) end end )
  5. ok i'll try my self but tell me if I am wrong
  6. Thanks but what about the text when you get freeze and unfreeze?
  7. yes , and text when you get freeze and some one you get unfreeze
  8. I tried but it didn't work can someone help me to add some text when you get frozen for 5 seconds and then some texts when the freeze gone?
  9. Now it works but how can I make it freeze you for 5 seconds only & drawtext will show in screen?
  10. I tested it but it's not working
  11. Even if this works there is no timer in it & no draw text on the screen?
  12. I tested it but it's not working only the markers shows up but it doesn't do anythings what did I do wrong? local myMarker = createMarker( 1791.537, 656.511, 17.626, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type if isPedInVehicle then if getPedOccupiedVehicle ( thePlayer ) then local playerVehicle = getPlayerOccupiedVehicle ( thePlayer ) local currentFreezeStatus = isElementFrozen ( playerVehicle ) local newFreezeStatus = not currentFreezeStatus setElementFrozen ( playerVehicle, newFreezeStatus ) end end end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function function MarkerHit() setTimer ( function() end, 5000, 1 ) end MarkerHit() function changeVisibility ( ) guiSetVisible (myWindow, not guiGetVisible ( myWindow ) ) end myWindow = guiCreateWindow ( 0.3, 0.3, 0.5, 0.60, "Test", true ) setTimer ( changeVisibility, 5000, 1 )
  13. Like this? [lua]local myMarker = createMarker(-2596.625, 579.358, 15.626, 'cylinder', 2.0, 255, 0, 0, 150) function MarkerHit( hitElement, matchingDimension ) -- define MarkerHit function for the handler local elementType = getElementType( hitElement ) -- get the hit element's type if isPedInVehicle then if getPedOccupiedVehicle ( thePlayer ) then local playerVehicle = getPlayerOccupiedVehicle ( thePlayer ) local currentFreezeStatus = isElementFrozen ( playerVehicle ) local newFreezeStatus = not currentFreezeStatus setElementFrozen ( playerVehicle, newFreezeStatus ) end end end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function function MarkerHit() setTimer ( function() end, 5000, 1 ) end MarkerHit() function changeVisibility ( ) guiSetVisible (myWindow, not guiGetVisible ( myWindow ) ) end myWindow = guiCreateWindow ( 0.3, 0.3, 0.5, 0.60, "Test", true ) setTimer ( changeVisibility, 5000, 1 ) [/lua]
  14. Can someone help me to create marker that when a vehicles enters it , the vehicle will be frozen for 5 seconds and some text will show on the screen?
  15. isa_Khamdan

    question

    Try this local theMarker = createMarker ( x, y, z, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerTeam ( hit ) and not isPedInVehicle ( hit ) then if getTeamName ( getPlayerTeam ( hit ) ) == 'TeamName' then setElementPosition( hit , x, y, z) end end end end,false )
  16. it works but the message show for everyone in the chat also I want to know how to make two messages one for the people who are allowed to use the marker and another one for the people who can't use it
  17. it doesn't work only the markers shows up.
  18. can you fit cancelEvent with the code? cancelEvent() r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) else r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) Edit: in the code you gave me ===Edit: the marker shows up but it don't change my position.
  19. What about setting it for player names instead of serial?
  20. how can I fix it? local theSerial = "0396C6F543425FFE37A326883D73B4F4" local theMarker = createMarker ( -2756.43, 377.55, 4.335, 'cylinder', 2.0, 75, 182, 76, 150 ) addEventHandler('onClientMarkerHit',theMarker, function ( hit ) if hit == localPlayer then if getPlayerSerial(player) == theSerial then and not isPedInVehicle ( hit ) then setElementPosition( hit , 2253.50, 589.58, 10.66 ) end end end end,false ) addEventHandler('onClientMarkerHit',theMarker, function(player) if (getPlayerSerial(player)~="0396C6F543425FFE37A326883D73B4F4")then cancelEvent() r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) else r,b,g = math.random(0, 255), math.random(0, 255), math.random(0, 255) outputChatBox( "text", player,r,b,g, true ) end end end)
  21. بسم الله الرحمن الرحيم تم بعون الله إفتتاح سيرفر تيربو العرب وهو سيرفر عربي جديد مخصص للهجوله والحرب ويوجد به إضافات كثيرة جميلة نتمنى أن تعجبكم. ~> صآآحب السيرفر : [Nexus] ~>قوانين السيرفر :-السب واستخدام الألفاظ المشينه ممنوع منه باتاً في السيرفر والعقوبه ستكون الإسكات لمده زمنيه محددة. -التخريب المتعمد في السيرفر ممنوع وستكون عقوبته الطرد لمده معينه. -نشر سيرفرات أخرى أو مواقع أو منتديات ستكون عقوبتها الباند المؤبد بدون أي تحذير. -تكبر أصحاب الرتب واستخدام سلطتهم لمضايقه باقي اللاعبين ستكون عقوبتها سحب الرتبه. كيفيه الدخول للسيرفر : قم بكتابة تيربو العرب أو Arabs Turbo 3.T في مربع البحث للدخول للسيرفر. او من الايبي: mtasa://5.9.206.178:8086 والآن أترككم مع خصائص ومميزات السيرفر مع بعض الصور -:: البدايه ::- -:: معرض السيارات ::- -:: الورشه ::- -:: الفري روم وقائمة السيارات ::- -:: ساحة الحرب / حرب العصابات ::- -:: مهمة البنك ::- -:: صور لبعض السيارات ::- Ford Crown Victoria 2003 Nissan Tiida Honda Accord Nissan Silvia Ford F-150 -:: فيديو بسيط عن سيارات السيرفر وماالى ذالك ::- [video=youtube;9ytPXgqsq_4] لوحة التسجيل / تسجيل الدخول : الخريطة : بعض السيارات الموجود في السيرفر : لوحة الوزنيات الجاهزه : لوحة التعديل اليدوي على الوزنيات : لوحة التحكم بالسيارة : الدردشة الخاصه : التوب 30 في الدرفت : لوحة تحويل النقود : ورشه تيربو العرب معرض سيارات تيربو العرب : إنتظروا جديدنا
×
×
  • Create New...