L3yr Posted June 25, 2017 Posted June 25, 2017 (edited) السلام عليكم شباب انا عامل كود كده رتب لتيم مافيا المشكله لما بكتب setRank فى F8 مش بيجبلى انا فى انهى رتبه ايه الخطاء شباب function L3yr1 ( _, killer ) local playeraccount = getPlayerAccount ( killer ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then setAccountData ( playeraccount, "scoreData", ( getAccountData ( playeraccount, "scoreData" )+1 ) or 1 ) outputChatBox ( "score +1", killer, 255,255,255 ) end end ------ addEventHandler ( "onPlayerWasted", root, L3yr1 ) ------ function L3yr2 ( _, acc ) if ( acc ) and not isGuestAccount ( acc ) then setAccountData ( acc, "scoreData", ( getAccountData ( acc, "scoreData" ) ) or 1 ) myrank = getAccountData ( acc, "scoreData" ) or 1 outputChatBox ( myrank, source, 255,255,255 ) end end ------ addEventHandler ( "onPlayerLogin", root, L3yr2 ) ------ function L3yr3 ( player ) local playeraccount = getPlayerAccount ( player ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local team = getPlayerTeam ( source ) if team then local teamname = getTeamName ( team ) if teamname == "MAFIA" then local score = getAccountData ( playeraccount, "scoreData" ) or 1 local accountName = getAccountName ( playeraccount ) if score >= 50 then aclGroupAddObject (aclGetGroup("rank1"), "user."..accountName) outputChatBox ( "Now you get rank1", player, 255,255,255 ) elseif score >= 150 then outputChatBox ( "Now you get rank2", player, 255,255,255 ) aclGroupAddObject (aclGetGroup("rank2"), "user."..accountName) elseif score >= 350 then outputChatBox ( "Now you get rank3", player, 255,255,255 ) aclGroupAddObject (aclGetGroup("rank3"), "user."..accountName) elseif score >= 500 then outputChatBox ( "Now you get rank4", player, 255,255,255 ) aclGroupAddObject (aclGetGroup("rank4"), "user."..accountName) elseif score >= 1000 then outputChatBox ( "Now you get rank5", player, 255,255,255 ) aclGroupAddObject (aclGetGroup("rank5"), "user."..accountName) end end end end end ------- addCommandHandler ( "setRank", L3yr3 ) ------- function L3yr2 ( ) local acc = getPlayerAccount ( source ) if ( acc ) and not isGuestAccount ( acc ) then setAccountData ( acc, "scoreData", ( getAccountData ( acc, "scoreData" ) ) or 1 ) end end addEventHandler ( "onPlayerQuit", root, L3yr4 ) Edited June 25, 2017 by L3yr
coNolel Posted June 25, 2017 Posted June 25, 2017 55 minutes ago, #BrosS said: L3yr4 مافي وظيفة كيف ماطلعلك غلط Edited 1 hour ago by L3yr Like this يا انه معدل يا انه كان يبي يكتب L3yr4 ------- function L3yr2 ( ) local acc = getPlayerAccount ( source ) if ( acc ) and not isGuestAccount ( acc ) then setAccountData ( acc, "scoreData", ( getAccountData ( acc, "scoreData" ) ) or 1 ) end end addEventHandler ( "onPlayerQuit", root, L3yr4 ) 1
L3yr Posted June 25, 2017 Author Posted June 25, 2017 3 hours ago, #BrosS said: L3yr4 مافي وظيفة كيف ماطلعلك غلط 2 hours ago, coNolel said: Edited 1 hour ago by L3yr Like this يا انه معدل يا انه كان يبي يكتب L3yr4 ------- function L3yr2 ( ) local acc = getPlayerAccount ( source ) if ( acc ) and not isGuestAccount ( acc ) then setAccountData ( acc, "scoreData", ( getAccountData ( acc, "scoreData" ) ) or 1 ) end end addEventHandler ( "onPlayerQuit", root, L3yr4 ) المشكله ما طلعلى اخطاء عشان اعرف اعدلو
L3yr Posted June 25, 2017 Author Posted June 25, 2017 15 hours ago, L3yr said: L3yr4 دا خطاء منى نسيت امسحو لما نقلتلكو الكود ايه يا شباب محدش عارف ايه الخطاء ؟؟
#BrosS Posted June 25, 2017 Posted June 25, 2017 Just now, L3yr said: ايه يا شباب محدش عارف ايه الخطاء ؟؟ قلت الخطأ بنفسك وش المطلوب منا
L3yr Posted June 25, 2017 Author Posted June 25, 2017 (edited) 48 minutes ago, #BrosS said: قلت الخطأ بنفسك وش المطلوب منا تعديله انا مش عارف فين الخطاء اخى بروس المشكله ما انحلت لما مسحت سطر L3yr 4 Edited June 25, 2017 by L3yr
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