Jump to content

~ مافي غيره, بوشنب لبى قلبه | تمم


Recommended Posts

السلآآم عليكم

واجهتني مشكلة فـ صناعة ماركر بـ كوماند ,ومسووي كوماند يخفي الماركر, بس اذا طلعت ماركرين, وكتبت الامر, يخفي الماركر الثاني بسس, انا ابيه يخفي كلل الماركرات اللي من هـ الكوماند

الكود

function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
local accName = getAccountName ( getPlayerAccount ( playerSource ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
        test = createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        addEventHandler("onMarkerHit", test, vehicles) --لآآحد يسألني عننه, الوظيفة حقته موجودة 
        outputChatBox ( "You got a red marker", playerSource ) 
        end 
    end 
end 
addCommandHandler ( "createmarker", CreateMarker ) 
  
function CreateMarkersz ( playerSource ) 
local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
destroyElement( test ) 
end 
end 
addCommandHandler ( "dmarker", cCreateMarkersz ) 

اتمنى انككم تفهمون, لآآني ماعرف اشرحح حالتي ض1

شكرا

Edited by Guest
Link to comment

اقول لك افضل ادمجه مع الصنع .. ^_^

  
function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
local accName = getAccountName ( getPlayerAccount ( playerSource ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
        if (isElement(test)) then destroyElement(test) test = nil end 
        test = createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        addEventHandler("onMarkerHit", test, vehicles) 
        outputChatBox ( "You got a red marker", playerSource ) 
        end 
    end 
end 
addCommandHandler ( "createmarker", CreateMarker ) 
  

سويته لك لو كتبت createmarker والماركر موجود من قبل يحذفه ويسوي ماركر

Link to comment
السلآآم عليكم

واجهتني مشكلة فـ صناعة ماركر بـ كوماند ,ومسووي كوماند يخفي الماركر, بس اذا طلعت ماركرين, وكتبت الامر, يخفي الماركر الثاني بسس, انا ابيه يخفي كلل الماركرات اللي من هـ الكوماند

الكود

function CreateMarker ( playerSource ) 
    if ( playerSource ) then 
        local x, y, z = getElementPosition ( playerSource ) 
local accName = getAccountName ( getPlayerAccount ( playerSource ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
        test = createMarker ( x, y, z, "checkpoint", 2, 255, 0, 0, 255 ) 
        addEventHandler("onMarkerHit", test, vehicles) --لآآحد يسألني عننه, الوظيفة حقته موجودة 
        outputChatBox ( "You got a red marker", playerSource ) 
        end 
    end 
end 
addCommandHandler ( "createmarker", CreateMarker ) 
  
function CreateMarkersz ( playerSource ) 
local accName = getAccountName ( getPlayerAccount ( playerSource ) ) -- get his account name 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
destroyElement( test ) 
end 
end 
addCommandHandler ( "dmarker", cCreateMarkersz ) 

اتمنى انككم تفهمون, لآآني ماعرف اشرحح حالتي ض1

شكرا

حزر فزر :lol:

ما اشوف الا ماركر واحد -_- ؟

+ ابو شنب اظن قال يبي الكود الثاني يحذف الماركر ما اشوفك حطيته -_-؟

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...