GTA San Posted April 29, 2018 Share Posted April 29, 2018 سلام عليكم هالرتبة الي بوزعها بي سطر اكتبها -- ( ***************************** ) -- -- ( Give Player Rank ) -- -- ( Created By Sm0ke Or iMr.Omar ) -- -- ( Skype : live:omarnone ) -- -- ( ***************************** ) -- -- Settings commandtogive = 'رتبة' ----- Functions function isPlayerInACL ( player , acl ) if ( getElementType ( player ) == 'player' and type ( acl ) == 'string') then if ( not isGuestAccount ( getPlayerAccount ( player ) ) ) then if isObjectInACLGroup ( 'user.'..getAccountName(getPlayerAccount(player)), aclGetGroup ( acl ) ) then return true else return false end end end end function addPlayerToGroup ( player , acl ) if ( getElementType ( player ) == 'player' and type ( acl ) == 'string' ) then if ( not isGuestAccount ( getPlayerAccount ( player ) ) ) then aclGroupAddObject ( aclGetGroup ( acl ), 'user.'..getAccountName(getPlayerAccount(player)) ) end end end ------- Code addCommandHandler('gift', function (player,_,group) local Groupname = table.concat({ group }, " ") if ( Groupname ) then setElementData(resourceRoot,'Status',true) setElementData(resourceRoot,'Rank',Groupname) outputChatBox('* يـوجد توزيع رتبه : '..Groupname..' | أكتب بـ اف 8 : '..commandtogive..' لـ استلام الرتبة !',root,0,255,0,true) else outputChatBox('* الرجاء كتابة اسم القروب ',player,255,0,0,true) end end ) addCommandHandler('stopgift', function (player) if ( getElementData ( resourceRoot , 'Status' ) == true ) then setElementData (resourceRoot,'Status',false) setElementData(resourceRoot,'Rank','None') outputChatBox('* تـم إيقاف التوزيع !',root,0,255,0,true) else outputChatBox('* لأيوجد توزيع لـ إيقافه',player,255,0,0,true) end end ) addCommandHandler(commandtogive, function (player) if ( getElementData ( resourceRoot , 'Status' ) == true ) then if ( not isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( not isPlayerInACL ( player , getElementData ( resourceRoot , 'Rank' ) ) ) then addPlayerToGroup ( player , getElementData ( resourceRoot , 'Rank' ) ) outputChatBox('* تـم إستلأم الرتبة بنجاح ',player,0,255,0,true) else outputChatBox('* لديك هاذي الرتبة من قبل !',player,255,0,0,true) end else outputChatBox('* الرجأء تسجيل الدخول , لـ تاخذ الهدية ',player,255,0,0,true) end else outputChatBox('* لايوجد توزيع !',player,255,0,0,true) end end ) --- # Event addEventHandler('onResourceStart',resourceRoot, function ( ) for k,g in ipairs ( getElementsByType('player') ) do outputChatBox('توزيع',g,255,255,255,true) end end ) addEventHandler('onResourceStop',resourceRoot, function ( ) setElementData ( resourceRoot , 'Status' , false ) setElementData ( resourceRoot , 'Rank', 'None') end ) --- Thanks To Download This Script -- Please Add This Script at Admin Group -- Ex : resource.resourceName -- See You Link to comment
+Source|> Posted April 29, 2018 Share Posted April 29, 2018 3 hours ago, GTA San said: سلام عليكم هالرتبة الي بوزعها بي سطر اكتبها -- ( ***************************** ) -- -- ( Give Player Rank ) -- -- ( Created By Sm0ke Or iMr.Omar ) -- -- ( Skype : live:omarnone ) -- -- ( ***************************** ) -- -- Settings commandtogive = 'رتبة' ----- Functions function isPlayerInACL ( player , acl ) if ( getElementType ( player ) == 'player' and type ( acl ) == 'string') then if ( not isGuestAccount ( getPlayerAccount ( player ) ) ) then if isObjectInACLGroup ( 'user.'..getAccountName(getPlayerAccount(player)), aclGetGroup ( acl ) ) then return true else return false end end end end function addPlayerToGroup ( player , acl ) if ( getElementType ( player ) == 'player' and type ( acl ) == 'string' ) then if ( not isGuestAccount ( getPlayerAccount ( player ) ) ) then aclGroupAddObject ( aclGetGroup ( acl ), 'user.'..getAccountName(getPlayerAccount(player)) ) end end end ------- Code addCommandHandler('gift', function (player,_,group) local Groupname = table.concat({ group }, " ") if ( Groupname ) then setElementData(resourceRoot,'Status',true) setElementData(resourceRoot,'Rank',Groupname) outputChatBox('* يـوجد توزيع رتبه : '..Groupname..' | أكتب بـ اف 8 : '..commandtogive..' لـ استلام الرتبة !',root,0,255,0,true) else outputChatBox('* الرجاء كتابة اسم القروب ',player,255,0,0,true) end end ) addCommandHandler('stopgift', function (player) if ( getElementData ( resourceRoot , 'Status' ) == true ) then setElementData (resourceRoot,'Status',false) setElementData(resourceRoot,'Rank','None') outputChatBox('* تـم إيقاف التوزيع !',root,0,255,0,true) else outputChatBox('* لأيوجد توزيع لـ إيقافه',player,255,0,0,true) end end ) addCommandHandler(commandtogive, function (player) if ( getElementData ( resourceRoot , 'Status' ) == true ) then if ( not isGuestAccount ( getPlayerAccount ( player ) ) ) then if ( not isPlayerInACL ( player , getElementData ( resourceRoot , 'Rank' ) ) ) then addPlayerToGroup ( player , getElementData ( resourceRoot , 'Rank' ) ) outputChatBox('* تـم إستلأم الرتبة بنجاح ',player,0,255,0,true) else outputChatBox('* لديك هاذي الرتبة من قبل !',player,255,0,0,true) end else outputChatBox('* الرجأء تسجيل الدخول , لـ تاخذ الهدية ',player,255,0,0,true) end else outputChatBox('* لايوجد توزيع !',player,255,0,0,true) end end ) --- # Event addEventHandler('onResourceStart',resourceRoot, function ( ) for k,g in ipairs ( getElementsByType('player') ) do outputChatBox('توزيع',g,255,255,255,true) end end ) addEventHandler('onResourceStop',resourceRoot, function ( ) setElementData ( resourceRoot , 'Status' , false ) setElementData ( resourceRoot , 'Rank', 'None') end ) --- Thanks To Download This Script -- Please Add This Script at Admin Group -- Ex : resource.resourceName -- See You طيب وش المشكله Link to comment
GTA San Posted April 29, 2018 Author Share Posted April 29, 2018 25 minutes ago, Source|> said: طيب وش المشكله طيب لاكتبت رتبة مايجي لي رتبة هو ويش اسم الرتبة الي بالكود Link to comment
+Source|> Posted April 29, 2018 Share Posted April 29, 2018 16 minutes ago, GTA San said: طيب لاكتبت رتبة مايجي لي رتبة هو ويش اسم الرتبة الي بالكود اكتب /gift 1 Link to comment
GTA San Posted April 29, 2018 Author Share Posted April 29, 2018 1 hour ago, Source|> said: اكتب /gift يب ولكن يطلع خطاء وين اضيف اسم الرتبة؟ مثلا الي يكتبها ياخذ ادمن او الخ وين احط اسم رتبة الاسل بي سطر Link to comment
#Major . Posted April 29, 2018 Share Posted April 29, 2018 انت تكتتب /gift admin وكذا 1 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