Jump to content

AliAlanzi

Members
  • Posts

    247
  • Joined

  • Last visited

Everything posted by AliAlanzi

  1. local bRespawn = nil function showRespawnButton(victimDropItem) showCursor(true) local width, height = 201,54 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth/2 - (width/2) local y = scrHeight/1.1 - (height/2) bRespawn = guiCreateButton(x, y, width, height,"Respawn",false) guiSetFont(bRespawn,"sa-header") addEventHandler("onClientGUIClick", bRespawn, function () if bRespawn then destroyElement(bRespawn) bRespawn = nil showCursor(false) guiSetInputEnabled(false) end triggerServerEvent("es-system:acceptDeath", getLocalPlayer(), getLocalPlayer(), victimDropItem) showCursor(false) end, false) end addEvent("es-system:showRespawnButton", true) addEventHandler("es-system:showRespawnButton", getLocalPlayer(),showRespawnButton) function ChangeMyButtonEnabled ( ) setTimer function () if ( guiGetEnabled ( bRespawn ) == true ) then guiSetEnabled ( bRespawn, false ) else guiSetEnabled ( bRespawn, true ) end,60000,1) end الحين انا عندي زر ابيه يكون مقفل ما يقدر يدعسه الا لوقت محدد سويت guiGetEnabled و ما نفع الزر ما يطلع لي في غلط مدري وش هو اذا اشيل الفنكشن حق guiGetEnabled يطلع الزر عادي وش الحل؟
  2. function finger ( playerSource, commandName, playerName ) if playerName then local thePlayer = getPlayerFromName ( playerName ) if thePlayer then triggerClientEvent ( thePlayer, "onPlayerWasted", thePlayer, ) else -- invalid player name specified end else -- No player name specified end end function finger1(thePlayer, commandName, ...) if (...) then local message = table.concat({...}, " ") finger1(thePlayer, 1, message) else outputChatBox("SYNTAX: /" .. commandName .. " [ID/Player Name]", thePlayer, 255, 194, 14) end end addCommandHandler ( "getfinger", finger )
  3. الداتا مخليها شوفها اذا صح ولا لا
  4. تراقر ما فهمتها حقت وش ذي ؟؟ و كيف اخلي داتا على اللاعب زي ما انت قلت
  5. الحين كودي صح فوق؟
  6. لا قصدي مثلا انا اختار مكان الوقت مثلا نص الشاشة ما ابيه بالشات function showRespawnButton(victimDropItem) showCursor(true) local width, height = 201,54 local scrWidth, scrHeight = guiGetScreenSize() local x = scrWidth/2 - (width/2) local y = scrHeight/1.1 - (height/2) bRespawn = guiCreateButton(x, y, width, height,"Respawn",false) guiSetFont(bRespawn,"sa-header") addEventHandler("onClientGUIClick", bRespawn, function () if bRespawn then destroyElement(bRespawn) bRespawn = nil showCursor(false) guiSetInputEnabled(false) end triggerServerEvent("es-system:acceptDeath", getLocalPlayer(), getLocalPlayer(), victimDropItem) showCursor(false) end, false) end addEvent("es-system:showRespawnButton", true) addEventHandler("es-system:showRespawnButton", getLocalPlayer(),showRespawnButton) function ChangeMyButtonEnabled ( ) setTimer function () if ( guiGetEnabled ( bRespawn ) == true ) then guiSetEnabled ( bRespawn, false ) else guiSetEnabled ( bRespawn, true ) end,60000,1) end كذا صح الحين؟
  7. الحين انا عندي زر لمن يموت لاعب يطلع الزر ابيه ما يقدر يدعسه الا بعد وقت محدد بس ما ابي الزر مخفي ابيه يكون موجود بس ما يقدر يدعسة و ابي مثلا فوق الزر يطلع وقت يبدا من 60 و ينزل الى 0
  8. الحين انا سويت الكود ذا لمن شخص يجي يكتب الامر يطلع له مين قتله و باي سلاح تفهمون من الكود Server Side -- function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then local tempString timer = setTimer(function () if ( getElementType ( attacker ) == "player" ) then tempString = getPlayerName ( attacker ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" elseif ( getElementType ( attacker ) == "vehicle" ) then tempString = getPlayerName ( getVehicleController ( attacker ) ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" end if ( bodypart == 9 ) then tempString = tempString.." (HEADSHOT!)" else tempString = tempString.." ("..getBodyPartName ( bodypart )..")" end outputChatBox ( tempString ) else outputChatBox ( getPlayerName ( source ).." died. ("..getWeaponNameFromID ( weapon )..") ("..getBodyPartName ( bodypart )..")" ) end local team = { getTeamFromName "Los Santos Fire Department" } getElementData ( thePlayer, "onPlayerWasted" ) end,6000, 1) end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) addCommandHandler ( "getfinger", player_Wasted ,false ,true ) ----- Client Side GUIEditor = { progressbar = {} } addEventHandler("onClientResourceStart", resourceRoot, function() progressbar = guiCreateProgressBar(569, 519, 212, 27, false ) guiSetVisible(progressbar,false) local timee = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 500, 1,progressbar,timee+10 ) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,timee+20 ) setTimer( guiProgressBarSetProgress, 1500, 1,progressbar,timee+30 ) setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,timee+40 ) setTimer( guiProgressBarSetProgress, 2500, 1,progressbar,timee+50 ) setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,timee+60 ) setTimer( guiProgressBarSetProgress, 3500, 1,progressbar,timee+70 ) setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,timee+80 ) setTimer( guiProgressBarSetProgress, 4500, 1,progressbar,timee+90 ) setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,timee+100 ) timer = setTimer(function () guiSetVisible(progressbar, false) guiProgressBarSetProgress(progressbar, 0) end,5000, 1) end ) و لمن يكتب الامر يطلع progressbar و لمن يخلص يطلع البيانات مين قتل الشخص و كذا في اغلاط بالاكواد ولا كويسة؟
  9. خلي اكواد التاج هنا \ في زر <> ادعس عليه و خلي الاكواد احسن
  10. يعني الي بحتاجه هو guiCreateProgressBar getElementData onPlayerWasted -- ذول الي بحاجهم صح؟ addCommandHandler getTeamFromName onPlayerWasted guiCreateProgressBar getElementData ذول اكيد احتاجهم
  11. اي شي بصمات رجلية يدية او شي بس brosS كيف اسوي التحميل الي تحت و الاشياء الي قتلها فوق؟ تراك انت بس قلت كم شي ما فادتني بشي
  12. ابي اسوي مود بصمات بس ابي ال function عشان اسويه ملاحظة هذا للحياة واقعية مثلا شخص قتل شخص يجي المباحث يدور على ادلة و بصمات و لمن يخلص يكتب امر اعرف كيف اسوي الامر ما يحتاج و لمن يكتب الامر يطلع تحميل حق مودات تحت يمشي 5 5 يعني يمشي 5 10 15 20 و الخ و لمن يخلص يطلع اسم الي قتل الشخص و بس اقدر اسوي مود زي مذا ولا مستحيل ض؟
  13. لا هي already الكل يشوفها ابيها التيم محدد
  14. شف هو اشتغل بس ثانية و العلامة تروح و لمن الشخص يسوي ريسباون العلامة ما تروح من خريطه الي تحت على يسار ابي اسويها العلامة تروح لمن الشخص يسوي ريسباون و اي شخص يقدر يشوف العلامة خلص غيرت الوقت بس التيم بعد
  15. الا ابي اخفي العلامة يعني تطلع ل تيم محدد و بأستخدام local teams = { getTeamFromName("Los Santos Fire Department"), } يصير استخدم الكود ذا؟ local theTeam = getTeamFromName ( teamName ) او ذا احسن؟ نفس الشي اصلن addEventHandler( "onPlayerWasted", getRootElement( ), function() setTimer( spawnPlayer, 60000, 1, source, 0, 0, 3 ) local Colours = { { 255, 0, 0, "Red", false }, { 0, 255, 0, "Green", false }, { 0, 0, 255, "Blue", false }, { 255, 255, 0, "Yellow", false }, { 255, 0, 255, "Pink", false }, { 0, 255, 255, "Light-Blue", false }, { 255, 255, 255, "White", false } } blip = getElementsByType ( "blip" ) for blipKey, blipValue in ipairs(blips) do blipIcon = getBlipIcon ( blipValue ) if ( blipIcon ~= 0 ) then setBlipIcon ( blipValue, 0 ) end end local x, y, z getElementPosition ( thePlayer ) local blip = createBlip ( x, y, z, ) setElementVisibleTo ( blip, thePlayer, true ) local teams = { getTeamFromName("Los Santos Fire Department"), } destroyElement ( blip ) end ) شكلة الكود هريس مرة ثانية
  16. setElementVisibleTo ما فهمتها ممكن تقلي حقت وش ذي؟
  17. طيب بضل احاول و احاول وش يعني مبتدا؟ عيب؟ فيها شي؟ كل شخص كان مبتدا و صار محترف و انا جاي هنا عشان تساعدوني مو عشان واحد يقول ذا سهل و انت مبتدا و مدري وشو x, y, z = getElementPosition(source) local theBlip = createBlip( x, y, z) اكيد احتاج الكود ذا صح؟ اصلن شكلي ما بنجح بضل كذا !
  18. المود ذا للحياة واقعية و كل سيرفرات تشتغل عليه و محد قدر يسويه انه الشخص لمن يموت يطلع علامة لللاسعاف انه في شخص ميت طبعا بالحياة واقعية ناس تبلغ اما اللعبة محد يعطي اهتمام و محد يبي يصير اسعاف لانه ماله عمل و انا ابي اسويه و بضل احاول و احاول Client local teams = { getTeamFromName("Los Santos Fire Department"), } addEvent("createBlip", true) addEvent("destroyBlip", true) addEventHandler( "onPlayerWasted", getRootElement( ), function createBlip( availableColourIndex, colourArray ) triggerEvent("destroyBlip", source, availableColourIndex) local x, y, z = getElementPosition(source) local tempBlip = createBlip(x, y, z, 0, 3, colourArray[1], colourArray[2], colourArray[3], 255, 255, 32767) attachElements(tempBlip, source) blipHolder[availableColourIndex] = tempBlip table.insert(arr, tempBlip) end addEventHandler("createpBlip", getRootElement(), createBlip) function destroyBlip( availableColourIndex ) if blipHolder[availableColourIndex] and isElement(blipHolder[availableColourIndex] ) then for a, b in ipairs(arr) do if b == blipHolder[availableColourIndex] then table.remove(arr,a) break end end destroyElement( blipHolder[availableColourIndex] ) blipHolder[availableColourIndex] = false end end addEventHandler("destroyBlip", getRootElement(), destroypBlip) local teamID = tonumber(getElementData(theTeam, "id")) if (teamID==1) end ) ---serverside local blipColours = { { 255, 0, 0, "Red", false }, { 0, 255, 0, "Green", false }, { 0, 0, 255, "Blue", false }, { 255, 255, 0, "Yellow", false }, { 255, 0, 255, "Pink", false }, { 0, 255, 255, "Light-Blue", false }, { 255, 255, 255, "White", false } } الحين كذا كود صح؟
  19. اجل ب debugscript ليه ما يطلع لي شي؟ وش الاغلاط؟
  20. عربي وش يعني هريس؟
  21. Client local blipColours = { { 255, 0, 0, "Red", false }, { 0, 255, 0, "Green", false }, { 0, 0, 255, "Blue", false }, { 255, 255, 0, "Yellow", false }, { 255, 0, 255, "Pink", false }, { 0, 255, 255, "Light-Blue", false }, { 255, 255, 255, "White", false } } ---------- server local teams = { getTeamFromName("Los Santos Police Department"), } local x, y, z = getElementPosition(source) function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then local tempString if ( getElementType ( attacker ) == "player" ) then tempString = getPlayerName ( attacker ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" elseif ( getElementType ( attacker ) == "vehicle" ) then tempString = getPlayerName ( getVehicleController ( attacker ) ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" end local theTeam = getPlayerTeam(thePlayer) local teamID = tonumber(getElementData(theTeam, "id")) if (teamID==1) then if ( bodypart == 9 ) then tempString = tempString.." (HEADSHOT!)" else tempString = tempString.." ("..getBodyPartName ( bodypart )..")" end outputChatBox ( tempString ) else outputChatBox ( getPlayerName ( source ).." died. ("..getWeaponNameFromID ( weapon )..") ("..getBodyPartName ( bodypart )..")" ) local x, y, z = getElementPosition(source) setBlipColor ( blipValue, 255, 255, 255, 255 ) end blip = getElementsByType ( "blip" ) for blipKey, blipValue in blips do blipIcon = getBlipIcon ( blipValue ) if ( blipIcon ~= 23 ) then setBlipIcon ( blipValue, 0 ) end end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) end ليه لمن اشغله و اقتل شخص ما يطلع شي؟
×
×
  • Create New...