Jump to content

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


Recommended Posts

   addCommandHandler("myjail", 
   function (player) 
   if isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) then 
   triggerClientEvent ("Open",player) 
   outputChatBox ("Panel Open",source,255,255,255,true) 
else 
outputChatBox ("You are not admin",source,255,255,255,true) 
end 
end) 

المشكلة اذا ادمن سوى الكلمة يفتح لكل الادمنية وش المشكلة في كلمة

player?

Link to comment

function OpenWindow ( player ) 
    local pAccount = getAccountName( getPlayerAccount ( player ) ) 
    if ( isObjectInACLGroup ( "user."..pAccount, aclGetGroup ( "Admin" ) ) ) then 
        triggerClientEvent ( player, "Open", player ) 
    outputChatBox ( "Panel Open", player, 255, 255, 255, true ) 
        else 
    outputChatBox ( "You are Not admin !", player, 255, 255, 255, true ) 
    end 
end 
addCommandHandler ( "myjail", OpenWindow ) 
Edited by Guest
Link to comment

function OpenWindow ( player ) 
  if ( getPlayerAccount ( player ) and not isGuestAccount ( getPlayerAccount ( player ) ) ) then 
    if ( isObjectInACLGroup ( "user."..getAccountName ( getPlayerAccount ( player ) ), aclGetGroup ( "Admin" ) ) ) then 
          triggerClientEvent ( player, "Open", player ) 
          outputChatBox ( "* Panel Opened", player, 255, 0, 0, true ) 
    else 
          outputChatBox ( "* you are not an admin", player, 255, 0, 0, true ) 
       end 
   else 
       outputChatBox ( "* login first !", player, 255, 0, 0, true ) 
   end 
end 
addCommandHandler ( "myjail", OpenWindow ) 
Link to comment
triggerClientEvent ("Open",player) 

طيب ورنا كود فتح اللوحة بالكلنت -.-

لوول نبهتني وين كانت المشكلة ض ما انتبهت مشكور كانت كذا

guiSetInputMode("no_binds_when_editing") 
    if guiGetVisible(wnd) then 
        guiSetVisible(wnd,false) 
        showCursor(false) 
    else 
        guiSetVisible(wnd,true) 
        showCursor(true) 
  
    end 
end 
    addEvent("Open",true) 
    addEventHandler ("Open",root,Openwnd) 

ذا

addEventHandler ("Open",root,Openwnd) 

مشكور خليتها source

Link to comment

بجرب الاكواد حقكم و اقولكم لاني توي شفت ردوكم مشكورين

بس زاحف قولي وش غيرت؟ طيب؟ انت خليت الكومند في اخر السطر بس ...؟

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