Jump to content

x[ تصحيح كود ]x شراء الرتب


Mers[o]n

Recommended Posts

ازيكم يا حبايبي ..

لو سمحتو انا كنت عايز اعرف انا اللي عملتة دا صح ولا غلط علشان سالت واحد قالي يب كدة صح

بس مش عايز يشتغل !!

ابي كود شراء الرتب بـ اللفل او القتل الزومبي بليزز بسرعة

xAddToGroupFunction_ = function ( Group,Price,Name )
	local account = getAccountName(getPlayerAccount(source));
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end
	if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end
    local sValue = getElementData( source,'Level' )
	if not sValue then sValue = '0:0:0' end
	local data = split(sValue,':')
	local Level = tonumber( data[1] )  
	if Level == nil or not tonumber(Level) then Level = 0 end
	if ( Level >= 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("rank",true)
addEventHandler("rank",root,xAddToGroupFunction_)

 

Edited by Mers[o]n
Link to comment
xAddToGroupFunction_ = function ( Group,Price,Name )
	local account = getAccountName(getPlayerAccount(source));
    if isGuestAccount(getPlayerAccount(source)) then return outputChatBox(" * يجب عليك التسجيل اولاَ",source,255,0,0,true); end
	if isObjectInACLGroup("user."..account, aclGetGroup(tostring(Group))) then return outputChatBox("** لديك هذهـ الرتبة فعـلا  ! ",source,255,0,0,true); end
    local Level = getElementData( source,'Level' ) 
	if  Level >= 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("rank",true)
addEventHandler("rank",root,xAddToGroupFunction_)

 

  • Sad 1
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...