Jump to content

لوسمحتم شباب طلب بسيط جدا


Recommended Posts

اخرر طلببب

ابي كود فتح اللوحة من اف8

function OpenWnd () 
        guiSetVisible (GUIEditor_Window[1], true)  < اسم النافذه 
                showCursor ( true ) 
    end 
addCommandHandler ( "open", OpenWnd ) 

لا ابيه اذا كتب مثلا شرطي في اف 8 يفتح له لوحة الشرطو + ابيه لقروب الشرطة

والزائر ولاناس الثانية يقول لهم ليش لديك صلاحية

Link to comment

function open () 
local pTeam = getPlayerTeam ( source ) 
if getTeamName ( pTeam ) == "اسم التيم" then 
guiSetVisible ( اسم النافذة, not guiSetVisible ( اسم النافذة ) ) 
showCursor ( true ) 
else 
outputChatBox ( "You do not have permission!", 255, 0, 0 ) 
end 
end 
addCommandHandler ( "الكلمة الا تبغي تفتح بها", open ) 
Edited by Guest
Link to comment

Client

addEvent("open",true) 
addEventHandler("open",root, 
    function () 
    guiSetVisible (GUIEditor_Window[1], true)  < اسم النافذه 
        showCursor(true)   
    end 
) 
  
addCommandHandler("op", 
function () 
   triggerServerEvent ( "enksar", localPlayer) 
    end 
) 
  

Server

addEvent("enksar",true) 
addEventHandler("enksar",root, 
    function() 
        local acc=getPlayerAccount(client) 
        if(isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("Police"))) then   
            triggerClientEvent(client,"open",client) 
        end 
    end 
) 

جرب : )

Link to comment
function open () 
local pTeam = getPlayerTeam ( source ) 
if getTeamName ( pTeam ) == "اسم التيم" then 
guiSetVisible ( اسم النافذة, not guiSetVisible ( اسم النافذة ) ) 
showCursor ( true ) 
else 
outputChatBox ( "You do not have permission!", 255, 0, 0 ) 
end 
end 
addCommandHandler ( "الكلمة الا تبغي تفتح بها", open ) 

خطآء : )

Link to comment
Client
addEvent("open",true) 
addEventHandler("open",root, 
    function () 
    guiSetVisible (GUIEditor_Window[1], true)  < اسم النافذه 
        showCursor(true)   
    end 
) 
  
addCommandHandler("op", 
function () 
   triggerServerEvent ( "enksar", localPlayer) 
    end 
) 
  

Server

addEvent("enksar",true) 
addEventHandler("enksar",root, 
    function() 
        local acc=getPlayerAccount(client) 
        if(isObjectInACLGroup("user."..getAccountName(acc),aclGetGroup("Police"))) then   
            triggerClientEvent(client,"open",client) 
        end 
    end 
) 

جرب : )

.. بجانب سيرفر ثم ترسل تريقر للكلاينت على طول، بدال ماترسل من كلاينت لسيرفر ثم من سيرفر لكلاينت addCommandHandler يمديكـ تسوي وظيفة

. تتخلص من مشكلة التخريب حق التريقر مثل تكرار الأمر وكذا +

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