Jump to content

iPrestege

Members
  • Posts

    10,056
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by iPrestege

  1. -- # Client Side : addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) ColorButtons ( ) end,false ) addEventHandler("onClientGUIClick",GUIEditor.button[9], function ( ) ColorLabel ( ) end,false ) function ColorButtons ( ) if not isTimer ( TimerButton ) then TimerButton = setTimer ( function( ) for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end,250,0 ) else if isTimer ( TimerButton ) then killTimer ( TimerButton ) TimerButton = nil for _,v in next,getElementsByType('gui-button',root) do guiSetProperty(v,"NormalTextColour","FFFFFFFF") end end end end function ColorLabel ( ) if not isTimer ( TimerLabel ) then TimerLabel = setTimer( function( ) for _, random in ipairs(getElementsByType('gui-label',root)) do guiLabelSetColor(random,math.random(255), math.random(255), math.random(255)) end end,250,0 ) else if isTimer ( TimerLabel ) then killTimer ( TimerLabel ) TimerLabel = nil for _,v in next,getElementsByType('gui-label',root) do guiLabelSetColor(v,255,255,255) end end end end
  2. line 10 = شيء ماهو معروف اصلا ماهو موجود line 17 = التايمر ماهو متكرر :')
  3. addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) M ( ) end,false ) function M ( ) if isTimer ( TM ) then killTimer ( TM ) TM = nil end TM = setTimer( function( ) for _,k in ipairs ( getElementsByType("gui-label",root)) do guiLabelSetColor ( k, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) end end,250,0 ) end
  4. متأكد من متغير الزر ؟ و متأكد انة كلنت debugscript 3 ?
  5. OK That's should work .
  6. Where's handler defined at?
  7. لم يتم التجربة : -- # Client Side : addEventHandler("onClientGUIClick",GUIEditor.button[5], function ( ) Color ( ) end,false ) function Color ( ) if isTimer ( Timer ) then killTimer ( Timer ) end Timer = setTimer( function( ) for _, random in ipairs(getElementsByType('gui-button',root)) do guiSetProperty(random, 'NormalTextColour', string.format("%.2X%.2X%.2X%.2X", 255, math.random(255), math.random(255), math.random(255))) end end,250,0 ) end
  8. 'dbExec' Use this function to create a table .
  9. No it's only client side you can use this server side : -- # Server Side local marker = createMarker(2121, 1402,10,"cylinder",2,0,255,0) addEventHandler("onMarkerHit",marker, function ( player ) if getElementType ( player ) == "player" then local vehicle = getPedOccupiedVehicle ( player ) if not vehicle then return end local vehicles = { 411,412,413 } local ID = (vehicles[math.random(#vehicles)]) setElementModel ( vehicle, ID ) end end,false )
  10. -- # Client Side local marker = createMarker(2121, 1402,10,"cylinder",2,0,255,0) addEventHandler("onClientMarkerHit",marker, function ( player ) if getElementType ( player ) == "player" then local vehicle = getPedOccupiedVehicle ( player ) if not vehicle then return end local vehicles = { 411,412,413 } local ID = (vehicles[math.random(#vehicles)]) setElementModel ( vehicle, ID ) end end,false ) Erros : -- You're entered id was wrong -- Check the vehicle with a source element ? -- Get a random model was wrong .
  11. الله يبارك فيكم عقبال الجميع ان شاء الله .. : D * القسم العام افضل لـ ذا الموضوع قسمه خاطئ
  12. addEventHandler "onPlayerChat" string.find cancelEvent ( ) outputChatBox
  13. You are triggering a ''kickAPlayer" Event and at the server side "onClientPlayerHeliKilled" I hope it's another joke .
  14. I Hope it's a joke the event client side and the function server side .
  15. زي getElementsByType ذا يجيب الالمنت اللي تبية اما هذا يجيب الاعبين اللي بتيم انت تحددهـ ..
  16. تقدر تسوي اي شيء مثلا addCommandHandler("Armor", -- كوماند function ( player ) for k,v in ipairs ( getPlayersInTeam ( getTeamFromName ( "3ssol" ) ) do -- نجيب كل الاعبين اللي بتيم عسول setPedArmor ( v,100 ) -- نحط الدرع 100 % outputChatBox(" "..getPlayerName ( player ).." Set 100 % Armor To All Player's On The Team!",v,0,255,0) -- نقول لكل الاعبين انة تم ..الخ ذذ end -- اغلاق end -- اغلاق ) -- اغلاق
  17. يجيب كل الاعبين اللي بـ التيم واضح من اسمة
  18. لا عايدي انصحكـ بـ الكود الاول !
  19. اذا لمسة وماهو بـ التيم يبعدهـ عن احداثياتة +10 للآكس ~ عموما تفضل الشرح للكلام مختصر ذذ : -- # Server Side : local Team = "Team Name Here" -- نختصر بـ اسم التيم حطة هنا داخل السترنق local marker = createMarker( x,y,z,"cylinder",5, 0, 0, 0, 0 ) -- نسوي الماركر addEventHandler("onMarkerHit",marker, -- الحدث يوم التلمس function ( player ) -- نعرف الالمنت اللي بيلمس الماركر if ( getElementType ( player ) == "player" ) then -- نتحقق انة الالمنت لاعب if ( getPlayerTeam ( player ) ~= getTeamFromName ( Team ) ) then -- اذا كان تيم الاعب ماهو بالتيم اللي اسمة فوق for _,v in next,getPlayersInTeam ( getTeamFromName ( Team ) ) do -- نجيب كل الاعبين اللي بالتيم من اسم التيم حقكـ # outputChatBox("* The Player ( "..getPlayerName ( player ) .." ) Enter The Team Area!",v,255,0,0) -- نظهر لهم اسم الاعب اللي لمس الماركر انة دخل المنطقة # end -- اغلاق end -- اغلاق end -- اغلاق end -- اغلاق ) -- اغلاق -- اتمنى تكون فهمت ي الغالي ( =
  20. انت قلت يطلعهم مو قصدك يطلعه من الماركر .. لوول ؟؟
  21. -- # Server Side : local Team = "Team Name Here" -- نختصر بـ اسم التيم حطة هنا داخل السترنق local marker = createMarker( x,y,z,"cylinder",5, 0, 0, 0, 0 ) -- نسوي الماركر addEventHandler("onMarkerHit",marker, -- الحدث يوم التلمس function ( player ) -- نعرف الالمنت اللي بيلمس الماركر if ( getElementType ( player ) == "player" ) then -- نتحقق انة الالمنت لاعب if ( getPlayerTeam ( player ) ~= getTeamFromName ( Team ) ) then -- اذا كان تيم الاعب ماهو بالتيم اللي اسمة فوق local x,y,z = getElementPosition ( player ) -- نجيب احداثياتة الاعب اللي مامعه التيم setElementPosition ( player,x +10,y,z ) -- نحطة بالاحداثيات ونزيد 10 يعني يبعدهـ شوي ذذ end -- اغلاق end -- اغلاق end -- اغلاق ) -- اغلاق -- اتمنى تكون فهمت ي الغالي ( =
  22. This is not the right section this is the right section : Portuguese / Português ‹ Programação em Lua
  23. انت حط اسم التيم هنا local Team = "You're Team Name" سويت اول مايشتغل يتحقق انة فية تيم بـ اسم التيم اللي انت حاطة اذا فية تمام اذا مافية يطفي المود ( = و سويت يوم تلمس الماركر وتيمكـ ماهو التيم اللي انت حاطة يظهر للاعبين اللي بالتيم اسم الاعب دخل المنطقة ..
×
×
  • Create New...