Jump to content

طلب مساعده في مود برستيج لشراء الرتب


THEKILIER

Recommended Posts

السلام عليكم ورحمة الله وبركاته

انا معي مود شراء الرتب حق برستيج

هذا رابط المود :

http://www.mediafire.com/download/ix8ni ... sRanks.zip

الحين أنا طبعا سويت قروب وسميته

Block

الحين أبي الي أشيفه بقروب

Block

مايقدر ياخد رتبة من اللوحه حق برستيج

كيف أسويها ؟

أنا سويت كود كدا بس أدري خبيصه :\

function() 
 if isObjectInACLGroup("user."..accname,aclGetGroup("Block")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("Moderator1")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("Moderator2")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("Moderator3"))  
or isObjectInACLGroup("user."..accname,aclGetGroup("Moderator4")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("SuperModerator1")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("SuperModerator2")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("SuperModerator3")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("SuperModerator4")) 
or isObjectInACLGroup("user."..accname,aclGetGroup("admin")) 
then 
  
        outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) 
        return 
end 

ساعدوني لاني مبتدا :roll:

Link to comment

جرب

  
----------------------- 
-- ** Buy Admin's Script 
-- Created By Mr.Pres[T]ege 
-- Ver 1.0.0 
-- Mail : [email protected] 
-- [url=http://www.gta-arabs.com]www.gta-arabs.com[/url] 
---------------------- 
kem = {"Block",} --شوف القروبات الايسل الي تبي تمنعها وضييفها للجدول 
function isPlayerAllowed(ply) 
for _, acl_ in ipairs (kem) do 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(ply)),aclGetGroup(acl_)) then 
return false 
else 
return true 
end 
end 
end 
xAddToGroupFunction_ = function ( Group,Price,Name ) 
    local account = getAccountName(getPlayerAccount(source)); 
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end 
    if isPlayerAllowed(source) == false then outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) return end 
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end 
    local sValue = getElementData( source,'PlayTime' ) 
    if not sValue then sValue = '0:0:0' end 
    local data = split(sValue,':') 
    local hour = tonumber( data[1] )   
    if hour == nil or not tonumber(hour) then hour = 0 end 
    if ( hour >= tonumber(Price))  then 
        aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); 
        outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); 
    else 
        outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); 
    end 
end 
addEvent("Accept:the:request",true) 
addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 
  

Link to comment
جرب
  
----------------------- 
-- ** Buy Admin's Script 
-- Created By Mr.Pres[T]ege 
-- Ver 1.0.0 
-- Mail : [email protected] 
-- [url=http://www.gta-arabs.com]http://www.gta-arabs.com[/url] 
---------------------- 
kem = {"Block",} --شوف القروبات الايسل الي تبي تمنعها وضييفها للجدول 
function isPlayerAllowed(ply) 
for _, acl_ in ipairs (kem) do 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(ply)),aclGetGroup(acl_)) then 
return false 
else 
return true 
end 
end 
end 
xAddToGroupFunction_ = function ( Group,Price,Name ) 
    local account = getAccountName(getPlayerAccount(source)); 
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end 
    if isPlayerAllowed(source) == false then outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) return end 
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end 
    local sValue = getElementData( source,'PlayTime' ) 
    if not sValue then sValue = '0:0:0' end 
    local data = split(sValue,':') 
    local hour = tonumber( data[1] )   
    if hour == nil or not tonumber(hour) then hour = 0 end 
    if ( hour >= tonumber(Price))  then 
        aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); 
        outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); 
    else 
        outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); 
    end 
end 
addEvent("Accept:the:request",true) 
addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 
  

اخترب صار الي يبي ياخد رتبة يقول له ساعاته مو كافيه وهو ساعاته كثيره

Link to comment

اشوف الكود مافيه مشكله كل الي اضفته للافنت الترايقر

if isPlayerAllowed(source) == false then outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) return end 

شوف انت شو عدلت يمكن منه الخطأ

او حمل المود من جديد وضيف له هذا التعديل للسيرفر

  
----------------------- 
-- ** Buy Admin's Script 
-- Created By Mr.Pres[T]ege 
-- Ver 1.0.0 
-- Mail : [email protected] 
-- [url=http://www.gta-arabs.com]www.gta-arabs.com[/url] 
---------------------- 
kem = {"Block",} --شوف القروبات الايسل الي تبي تمنعها وضييفها للجدول 
function isPlayerAllowed(ply) 
for _, acl_ in ipairs (kem) do 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(ply)),aclGetGroup(acl_)) then 
return false 
else 
return true 
end 
end 
end 
xAddToGroupFunction_ = function ( Group,Price,Name ) 
    local account = getAccountName(getPlayerAccount(source)); 
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end 
    if isPlayerAllowed(source) == false then outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) return end 
    if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end 
    local sValue = getElementData( source,'PlayTime' ) 
    if not sValue then sValue = '0:0:0' end 
    local data = split(sValue,':') 
    local hour = tonumber( data[1] )   
    if hour == nil or not tonumber(hour) then hour = 0 end 
    if ( hour >= tonumber(Price))  then 
        aclGroupAddObject (aclGetGroup( tostring(Group)),"user."..account); 
        outputChatBox("** تم اضافة الرتبة بنجاح | "..Name,source,0,255,0,true); 
    else 
        outputChatBox("**ليس لديك ساعات كافية",source,255,0,0,true); 
    end 
end 
addEvent("Accept:the:request",true) 
addEventHandler("Accept:the:request",root,xAddToGroupFunction_) 
  

Link to comment

@Kemo : عندك اخطاء

kem = {"Block",} > kem = {"Block"}

+

function isPlayerNotAllowed(ply) 
       for _, acl_ in ipairs (kem) do 
              if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(ply)),aclGetGroup(acl_)) then 
                     return true 
              end 
       end 
end 

+

صاحب الموضوع عدل ع الكود هذا

if isPlayerAllowed(source) == false then outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) return end

الى

if isPlayerNotAllowed(source) == true then outputChatBox("لايمكنك أخد رتبة لأنك محظور" , source , 255 , 0 , 0 , true ) return end

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...