-#Saimon Posted April 25, 2014 Share Posted April 25, 2014 السلام عليكم ورحمة الله وبركاته آبي فنكشنآت اذا الاعب قتل بسلاح معين 50 مره يحطه بقروب آسل + يحفظ عدد القتل بالحسآب Link to comment
jafar Posted April 25, 2014 Share Posted April 25, 2014 "onPlayerWasted" setElementData setAccountData getPlayerAccount getAccountData getElementData Link to comment
-#Saimon Posted April 25, 2014 Author Share Posted April 25, 2014 وفنكشنآت اذا الاعب قتل بسلاح آي دي 31 .. 50 مره Link to comment
#DRAGON!FIRE Posted April 25, 2014 Share Posted April 25, 2014 Event: "onPlayerWasted" getPedWeapon setAccountData getAccountData isObjectInACLGroup aclGroupAddObject Link to comment
-#Saimon Posted April 25, 2014 Author Share Posted April 25, 2014 ابي مثآل بسيط على هذول لان مآفهمتهم onPlayerWasted getPedWeapon Link to comment
ALw7sH Posted April 25, 2014 Share Posted April 25, 2014 ابي مثآل بسيط على هذول لان مآفهمتهمonPlayerWasted getPedWeapon addEventHandler( "onPlayerWasted", getRootElement( ), -- اذا مات اللاعب function() if getPedWeapon ( source , 31) then -- يتحقق لو معه سلاح الي الايدي حقه 31 outPutChatBox("Null") -- يكتب ف الشات end end ) Link to comment
-#Saimon Posted April 26, 2014 Author Share Posted April 26, 2014 ادري انه هريسه لكن هذا الي قدرت عليه function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker ) then if getElementData(attacker, "Skill") then local kills = getElementData(attacker, "Skill") setElementData(attacker, "Skill", getElementData(attacker, "Skill")+1) if kills >= 1 and kills <= 2 then else setElementData(attacker, "Skill", 1) end end end end addEventHandler ( "onPlayerWasted", getRootElement(), Forgive ) function Forgive(attacker) if getPedWeapon ( source , 31) then getElementData(attacker, "Skill", +1) end Link to comment
#DRAGON!FIRE Posted April 27, 2014 Share Posted April 27, 2014 كودكـ من اوله لـ نهايته خخخطا وشي ثاني انه يجب استخدم اكاونت داتا مو داتا ذذ Link to comment
-#Saimon Posted April 27, 2014 Author Share Posted April 27, 2014 كودكـ من اوله لـ نهايته خخخطاوشي ثاني انه يجب استخدم اكاونت داتا مو داتا ذذ طيب سو فيني خير وصلحه لاني حآولت قدر المستطآع Link to comment
-#Saimon Posted May 6, 2014 Author Share Posted May 6, 2014 هذا آخر شي قدرت اسويه . هل الكود صحيح ولا لا ؟ addEventHandler("onPlayerWasted",getRootElement(),function(killer, killerweapon) setElementData(source,"kor","0") if killer and killerweapon and ( killerweapon == 34 ) then kio = getElementData(killer,"kor") if ( killerweapon == 34 ) then setElementData(killer,"kor",tonumber(kio)+1) kio = tonumber(kor)+1 end if tonumber(kio) >= 5 then triggerServerEvent("SetToGroupACL",getLocalPlayer(),kio) end end Link to comment
-#Saimon Posted May 7, 2014 Author Share Posted May 7, 2014 احد يعرف الححل ؟ ولا اقفل الموضوع Link to comment
#Rmad~> Posted May 7, 2014 Share Posted May 7, 2014 (edited) addEventHandler("onPlayerWasted",root, function (killer) if not (getPedWeapon (killer) == 34) then return end if ( killer and killer ~= source ) then local Get = getElementData ( killer, "kor" ) or 0 setElementData(source,"kor", ( Get + 1 )) if Get >= 5 then triggerServerEvent("SetToGroupACL",localPlayer,Get) end end end ) addEventHandler( "onPlayerQuit" ,root, function() local accP = getPlayerAccount(source) if ( accP and not isGuestAccount(accP)) then local kor = tonumber(getElementData(source,"kor")) or 0 setAccountData(accP,"Points",kor) end end ) addEventHandler( "onPlayerLogin", root, function( _,acc) local kor = getAccountData(acc,"Points") if (kor) then setElementData(source,"kor",kor) end end ) Updete for Save In AccountData.. Edited May 8, 2014 by Guest Link to comment
The Killer Posted May 7, 2014 Share Posted May 7, 2014 اولا ليش الترايقر ؟ ثانيا استبدل group name في اول سطر بأسم قروب الادمن الي تبي تعطيه للأعب اذا وصل 50 group = "group name" addEventHandler ("onPlayerLogin", root, function (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "count") if (accountData) then setElementData (source, "count", getAccountData (theCurrentAccount, "count")) outputChatBox ("You have [" .. getAccountData (theCurrentAccount, "count") .. "] of point.", source, 255, 255, 0) end end end) addEventHandler("onPlayerWasted",root, function(totalAmmo, killer, killerweapon, bodypart) if killer and killerweapon == 31 then if getElementData (killer, "count") ~= getElementData (killer, "count") then setElementData (killer, "count", 0) end setElementData (killer, "count", getElementData (killer, "count") + 1) outputChatBox ("You got 1 point now you have [" .. getElementData (killer, "count") .. "] of point.", killer, 0, 255, 0) if getElementData (killer, "count") == 50 then outputChatBox ("Congratulation you have a 50 point and you got a " .. group .. ".", killer, 0, 255, 0) local account = getAccountName(getPlayerAccount(killer)) aclGroupAddObject (aclGetGroup(group),"user."..account) end end end) addEventHandler ("onPlayerQuit", root, function (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "count", getElementData (source, "count")) end end end) Link to comment
-#Saimon Posted May 7, 2014 Author Share Posted May 7, 2014 اولا ليش الترايقر ؟ثانيا استبدل group name في اول سطر بأسم قروب الادمن الي تبي تعطيه للأعب اذا وصل 50 group = "group name" addEventHandler ("onPlayerLogin", root, function (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "count") if (accountData) then setElementData (source, "count", getAccountData (theCurrentAccount, "count")) outputChatBox ("You have [" .. getAccountData (theCurrentAccount, "count") .. "] of point.", source, 255, 255, 0) end end end) addEventHandler("onPlayerWasted",root, function(totalAmmo, killer, killerweapon, bodypart) if killer and killerweapon == 31 then if getElementData (killer, "count") ~= getElementData (killer, "count") then setElementData (killer, "count", 0) end setElementData (killer, "count", getElementData (killer, "count") + 1) outputChatBox ("You got 1 point now you have [" .. getElementData (killer, "count") .. "] of point.", killer, 0, 255, 0) if getElementData (killer, "count") == 50 then outputChatBox ("Congratulation you have a 50 point and you got a " .. group .. ".", killer, 0, 255, 0) local account = getAccountName(getPlayerAccount(killer)) aclGroupAddObject (aclGetGroup(group),"user."..account) end end end) addEventHandler ("onPlayerQuit", root, function (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "count", getElementData (source, "count")) end end end) ماظبط حاطه ملف سيرفر + خليتها من 3 وجربت ع واحد ولا صار شي Link to comment
-#Saimon Posted May 7, 2014 Author Share Posted May 7, 2014 addEventHandler("onPlayerWasted",root, function (killer) if not (getPedWeapon (killer) == 34) then return end if ( killer and killer ~= source ) then local Get = getElementData ( killer, "kor" ) or 0 setElementData(source,"kor", ( Get + 1 )) if Get >= 5 then triggerServerEvent("SetToGroupACL",localPlayer,Get) end end end ) addEventHandler( "onPlayerQuit" ,root, function() local accP = getPlayerAccount(source) if ( accP and not isGuestAccount(accP)) then local kor = tonumber(getElementData(source,"kor")) or 0 setAccountData(accP,"Points",kor) end end ) addEventHandler( "onPlayerLogin", root, function( _,acc) local kor = getAccountData(acc,"Points") if (kor) then setElementData(source,"kor",kor) setElementData(source,"Kills",DataKills) end end ) Updete for Save In AccountData.. ابيه يحطه في قروب آسل Link to comment
The Killer Posted May 7, 2014 Share Posted May 7, 2014 اولا ليش الترايقر ؟ثانيا استبدل group name في اول سطر بأسم قروب الادمن الي تبي تعطيه للأعب اذا وصل 50 group = "group name" addEventHandler ("onPlayerLogin", root, function (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "count") if (accountData) then setElementData (source, "count", getAccountData (theCurrentAccount, "count")) outputChatBox ("You have [" .. getAccountData (theCurrentAccount, "count") .. "] of point.", source, 255, 255, 0) end end end) addEventHandler("onPlayerWasted",root, function(totalAmmo, killer, killerweapon, bodypart) if killer and killerweapon == 31 then if getElementData (killer, "count") ~= getElementData (killer, "count") then setElementData (killer, "count", 0) end setElementData (killer, "count", getElementData (killer, "count") + 1) outputChatBox ("You got 1 point now you have [" .. getElementData (killer, "count") .. "] of point.", killer, 0, 255, 0) if getElementData (killer, "count") == 50 then outputChatBox ("Congratulation you have a 50 point and you got a " .. group .. ".", killer, 0, 255, 0) local account = getAccountName(getPlayerAccount(killer)) aclGroupAddObject (aclGetGroup(group),"user."..account) end end end) addEventHandler ("onPlayerQuit", root, function (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "count", getElementData (source, "count")) end end end) -,-" Link to comment
-#Saimon Posted May 7, 2014 Author Share Posted May 7, 2014 @TheKiller " رديت عليك بالصفحه الاولى . مايشتغل وانا اخوك Link to comment
Mr-M3AND Posted May 8, 2014 Share Posted May 8, 2014 جرب group = "group name" addEventHandler ("onPlayerLogin", root, function (thePreviousAccount, theCurrentAccount, autoLogin) if not (isGuestAccount (getPlayerAccount (source))) then local accountData = getAccountData (theCurrentAccount, "count") if (accountData) then setElementData (source, "count", getAccountData (theCurrentAccount, "count")) outputChatBox ("You have [" .. getAccountData (theCurrentAccount, "count") .. "] of point.", source, 255, 255, 0) end end end) addEventHandler("onPlayerWasted",root, function(totalAmmo, killer, killerweapon, bodypart) if killer and killerweapon == 31 then if not (getElementData (killer, "count")) then setElementData (killer, "count", 0) end setElementData (killer, "count", getElementData (killer, "count") + 1) outputChatBox ("You got 1 point now you have [" .. getElementData (killer, "count") .. "] of point.", killer, 0, 255, 0) if getElementData (killer, "count") == 50 then outputChatBox ("Congratulation you have a 50 point and you got a " .. group .. ".", killer, 0, 255, 0) local account = getAccountName(getPlayerAccount(killer)) aclGroupAddObject (aclGetGroup(group),"user."..account) end end end) addEventHandler ("onPlayerQuit", root, function (quitType, reason, responsibleElement) if not (isGuestAccount (getPlayerAccount (source))) then account = getPlayerAccount (source) if (account) then setAccountData (account, "count", getElementData (source, "count")) end end end) Link to comment
The Killer Posted May 8, 2014 Share Posted May 8, 2014 @TheKiller " رديت عليك بالصفحه الاولى . مايشتغل وانا اخوك الكو شغال معي -,- Link to comment
-#Saimon Posted May 9, 2014 Author Share Posted May 9, 2014 @TheKiller " رديت عليك بالصفحه الاولى . مايشتغل وانا اخوك الكو شغال معي -,- يحطك بقروب آسل ؟ + وش سويت ؟ ضفته بقروب ادمنن Link to comment
ALw7sH Posted May 10, 2014 Share Posted May 10, 2014 @TheKiller " رديت عليك بالصفحه الاولى . مايشتغل وانا اخوك الكو شغال معي -,- يحطك بقروب آسل ؟ + وش سويت ؟ ضفته بقروب ادمنن لازم تضيفه لقروب ادمن عشان يشتغل صح لانه فنكشن الي يضيفه للأسل يحتاج خصائص 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