AliAlanzi Posted July 31, 2017 Share Posted July 31, 2017 الحين انا سويت الكود ذا لمن شخص يجي يكتب الامر يطلع له مين قتله و باي سلاح تفهمون من الكود 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 و لمن يخلص يطلع البيانات مين قتل الشخص و كذا في اغلاط بالاكواد ولا كويسة؟ Link to comment
' A F . Posted July 31, 2017 Share Posted July 31, 2017 طيب انت تبي اللاعب اذا مات يكتب أمر ويطلع تحميل ويوم ينتهي يطلع من قتله ؟ Link to comment
' A F . Posted July 31, 2017 Share Posted July 31, 2017 سوي يوم يموت اللاعب حط داتا على اللاعب وخلي قيمته اللاعب الي قتله ثم سوي بالكوماند triggerClientEvent setTimer guiProgressBarSetProgress guiProgressBarGetProgress getElementData outputChatBox Link to comment
AliAlanzi Posted July 31, 2017 Author Share Posted July 31, 2017 تراقر ما فهمتها حقت وش ذي ؟؟ و كيف اخلي داتا على اللاعب زي ما انت قلت Link to comment
' A F . Posted August 1, 2017 Share Posted August 1, 2017 ترايقر عشان تظهر له التحميل بالنسبة لـ الداتا استخدمها مع حدث 'onPlayerWasted' حط داتا للاعب الي مات قيمة والقيمة راح تكون اللاعب الي قتله Link to comment
AliAlanzi Posted August 1, 2017 Author Share Posted August 1, 2017 الداتا مخليها شوفها اذا صح ولا لا Link to comment
AliAlanzi Posted August 1, 2017 Author Share Posted August 1, 2017 (edited) 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 ) Edited August 1, 2017 by Ghost-Gamer Link to comment
' A F . Posted August 1, 2017 Share Posted August 1, 2017 مآشوفك مسوي داتا ولا شيء من اكوادك أحسك انك تبي جآهز صراحتاً . Link to comment
AliAlanzi Posted August 1, 2017 Author Share Posted August 1, 2017 (edited) لا والله ابي اتعلم بس مبتدا ف يعني ما افهم كثير كثير --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 ) ----Server Side# 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 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" } thePlayer = getPlayerFromName ( playerName ) if thePlayer then triggerClientEvent ( thePlayer, "onPlayerWasted", thePlayer ) outputChatBox ( ..thePlayer "Was Killed By"..attacker.., source ) getElementData ( thePlayer, "onPlayerWasted", true ) end 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 addCommandHandler ( "getfinger", finger ) addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted هذا الي انا مسويه بس مدري ليه ا يشتغل Edited August 1, 2017 by Ghost-Gamer Link to comment
Mhmd.z Posted August 1, 2017 Share Posted August 1, 2017 On 7/31/2017 at 08:44, Ghost-Gamer said: الحين انا سويت الكود ذا لمن شخص يجي يكتب الامر يطلع له مين قتله و باي سلاح تفهمون من الكود و لمن يخلص يطلع البيانات مين قتل الشخص و كذا في اغلاط بالاكواد ولا كويسة؟ ابدا من جديد احذف اكوادك المخربطه ذي 'onClientPlayerWasted'--اول ما يموت الاعب نعطيه داتا باسم القاتل setElementData--لاعطاء الداتا getPlayerName--نعطي الاعب داتا باسم القاتل addCommandHandler--نسوي امر علشان يطلع للاعب التحميل guiCreateProgressBar , guiProgressBarSetProgress , setTimer -- الوظائف يلي رح تستخدمها للتحميل outputChatBox -- (بعد ما يخلص التايمر حق التحميل تجيب بالشات داتا يلي مع الاعب ( الداتا يلي باسم القاتل Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now