Jump to content

x[ طلب ]x فانكشنات وأحداث سحب رتبه


Mr.OppS

Recommended Posts

السلام عليكم,
كيف الحال؟

هذا كود ماركر يسوى انتقال ! تدخل ماركر = تروح منطقة أخـرى
ألكود:-

--Server Side 

MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)

addEventHandler('onMarkerHit',MoF,
function (thePlayer)
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
end
)


أريد اسوى اضافة ! الماركر
1) تدخل ماركر = تروح منطقة اخرى
2) تـسـحـب جـمـيـع رتـب  ! هذا شخص  @
انا الان معى رتـبـة ادمن و لفل 1 و مشرف ,, أذا ادخل ماركر = كل رتـب الخاصـة بى تـنـسـحب تلقائى + اروح منطقة



شكراً

Link to comment
MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)

addEventHandler('onMarkerHit',MoF,
function (thePlayer)
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
aclGroupRemoveObject (aclGetGroup("TheRank"), "user."..getAccountName ( getPlayerAccount ( source ) ))
end
)

TheRank = إسم الرتبة ,
واذا تبغا تحذف كمان رتب امشي ع نفس الطريقة يعني كذا ,
 

MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)

addEventHandler('onMarkerHit',MoF,
function (thePlayer)
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
aclGroupRemoveObject (aclGetGroup("TheRank"), "user."..getAccountName ( getPlayerAccount ( source ) ))
aclGroupRemoveObject (aclGetGroup("TheRank2"), "user."..getAccountName ( getPlayerAccount ( source ) ))
end
)

 

Link to comment

أفضل طريقة كذا :
 

MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)
function getPlayerAcls(thePlayer)
    local acls = {}
    local account = getPlayerAccount(thePlayer)
    if (account) and not (isGuestAccount(account)) then
        local accountName = getAccountName(account)
        for i,group in ipairs(aclGroupList()) do
            if (isObjectInACLGroup( "user." ..accountName, group)) then
                local groupName = aclGroupGetName(group)
                table.insert(acls, groupName)
            end
        end
    end
    return acls
end
addEventHandler('onMarkerHit',MoF,
function (thePlayer)
local account = getPlayerAccount(thePlayer)
if not (isGuestAccount(account)) then
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
for _, GroupName in ipairs ( getPlayerAcls ( thePlayer ) ) do
aclGroupRemoveObject (aclGetGroup(GroupName), "user."..getAccountName ( account ))
end
end
end
)

 

Edited by iMr.WiFi..!
تصحيح خطأ ..
Link to comment
Just now, MR.StoRm said:

MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)

addEventHandler('onMarkerHit',MoF,
function (thePlayer)
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
aclGroupRemoveObject (aclGetGroup("TheRank"), "user."..getAccountName ( getPlayerAccount ( source ) ))
end
)

TheRank = إسم الرتبة ,
واذا تبغا تحذف كمان رتب امشي ع نفس الطريقة يعني كذا ,
 


MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)

addEventHandler('onMarkerHit',MoF,
function (thePlayer)
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
aclGroupRemoveObject (aclGetGroup("TheRank"), "user."..getAccountName ( getPlayerAccount ( source ) ))
aclGroupRemoveObject (aclGetGroup("TheRank2"), "user."..getAccountName ( getPlayerAccount ( source ) ))
end
)

 


لا ما أريد انا اضيف اسماء رتـب !! أريـد هو لحالة يـسـحـب كل رتـب هذا شخص تلقائيا
بدون ما اضيف اسماء رتب

Edited by Mr.OppS
Link to comment
1 minute ago, iMr.WiFi..! said:

أفضل طريقة كذا :
 


MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)
function getPlayerAcls(thePlayer)
    local acls = {}
    local account = getPlayerAccount(thePlayer)
    if (account) and not (isGuestAccount(account)) then
        local accountName = getAccountName(account)
        for i,group in ipairs(aclGroupList()) do
            if (isObjectInACLGroup( "user." ..accountName, group)) then
                local groupName = aclGroupGetName(group)
                table.insert(acls, groupName)
            end
        end
    end
    return acls
end
addEventHandler('onMarkerHit',MoF,
function (thePlayer)
local account = getPlayerAccount(thePlayer)
if not (isGuestAccount(account)) then
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
for _, GroupName in ipairs ( getPlayerAcls ( thePlayer ) ) do
aclGroupRemoveObject (aclGetGroup(GroupName), "user."..getAccountName ( getPlayerAccount ( source ) ))
end
end
end
)

 

طريقتك مختصرة اكثر ,
لكن حقتي تظبط كمان 

Link to comment
On ٢١‏/٩‏/٢٠١٧ at 23:17, iMr.WiFi..! said:

أفضل طريقة كذا :
 


MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)
function getPlayerAcls(thePlayer)
    local acls = {}
    local account = getPlayerAccount(thePlayer)
    if (account) and not (isGuestAccount(account)) then
        local accountName = getAccountName(account)
        for i,group in ipairs(aclGroupList()) do
            if (isObjectInACLGroup( "user." ..accountName, group)) then
                local groupName = aclGroupGetName(group)
                table.insert(acls, groupName)
            end
        end
    end
    return acls
end
addEventHandler('onMarkerHit',MoF,
function (thePlayer)
local account = getPlayerAccount(thePlayer)
if not (isGuestAccount(account)) then
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
for _, GroupName in ipairs ( getPlayerAcls ( thePlayer ) ) do
aclGroupRemoveObject (aclGetGroup(GroupName), "user."..getAccountName ( account ))
end
end
end
)

 

لو خش المنت غير اللاعب الماركر راح تطلع بقات لليل

  • Thanks 2
Link to comment
On ٢١‏/٩‏/٢٠١٧ at 23:17, iMr.WiFi..! said:

أفضل طريقة كذا :
 


MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)
function getPlayerAcls(thePlayer)
    local acls = {}
    local account = getPlayerAccount(thePlayer)
    if (account) and not (isGuestAccount(account)) then
        local accountName = getAccountName(account)
        for i,group in ipairs(aclGroupList()) do
            if (isObjectInACLGroup( "user." ..accountName, group)) then
                local groupName = aclGroupGetName(group)
                table.insert(acls, groupName)
            end
        end
    end
    return acls
end
addEventHandler('onMarkerHit',MoF,
function (thePlayer)
local account = getPlayerAccount(thePlayer)
if not (isGuestAccount(account)) then
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
for _, GroupName in ipairs ( getPlayerAcls ( thePlayer ) ) do
aclGroupRemoveObject (aclGetGroup(GroupName), "user."..getAccountName ( account ))
end
end
end
)

 

MoF = createMarker(-3604.26904 ,-3005.54492 ,268.92032,'corona',2,234,255,0,255)
function getPlayerAcls(thePlayer)
    local acls = {}
    local account = getPlayerAccount(thePlayer)
    if (account) and not (isGuestAccount(account)) then
        local accountName = getAccountName(account)
        for i,group in ipairs(aclGroupList()) do
            if (isObjectInACLGroup( "user." ..accountName, group)) then
                local groupName = aclGroupGetName(group)
                table.insert(acls, groupName)
            end
        end
    end
    return acls
end
addEventHandler('onMarkerHit',MoF,
function (thePlayer)
if getElementType ( thePlayer ) == 'player' then
local account = getPlayerAccount(thePlayer)
if not (isGuestAccount(account)) then
setElementPosition(thePlayer,-3614.17456 ,-3005.52588 ,268.92032)
for _, GroupName in ipairs ( getPlayerAcls ( thePlayer ) ) do
aclGroupRemoveObject (aclGetGroup(GroupName), "user."..getAccountName ( account ))
end
end
end
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...