Jump to content

|BindKey Amdin|


Recommended Posts

Posted

السلام عليكم

طلب كود

BindKey

يفتح للـ ادمن فقط! |

:) :) :!:

=[ من مواضيعي ]=

____________________

NEW | Weapon_ShopV2

NEW | position_v1

Soon | Skin_SystemV2

NEW | Police_CarsV1

Soon | Police_OFFICER

Soon | WarpPanelV2.1

____________________

Posted (edited)

سوي الكود و تحقق اذا اللاعب ادمن بس :/

key = "K" -- F1 بدل الحرف الي بين العلامتين للزر الي تبيه مثلا  
bindKey ( هنا تحدد اللاعب,  
key, "down",  
function() 
local account=getAccountName( getPlayerAccount( هنا اللاعب الي ضغط الزر ) 
if isObjectInACLGroup("user.".. account, aclGetGroup("Console") ) then 
-- your code 
end 
end    ) 

Edited by Guest

Discord ID : nxFairlywell#6895

 

Posted (edited)
سوي الكود و تحقق اذا اللاعب ادمن بس :/
key = "K" -- F1 بدل الحرف الي بين العلامتين للزر الي تبيه مثلا  
bindKey ( key, "down", function() 
local account=getAccountName( getPlayerAccount( هنا اللاعب الي ضغط الزر ) 
if isObjectInACLGroup("user.".. account, aclGetGroup("Console") ) then 
-- your code 
end 
end    ) 

bindKey ( player thePlayer, string key, string keyState, function handlerFunction,  [ var arguments, ... ] ) 

Edit :

Server Side

local Group = "Console" 
local Key = "Key" 
addEventHandler("onResourceStart", resourceRoot, function( ) 
    for k,v in ipairs(getElementsByType("player")) do 
        if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(v)), aclGetGroup(Group)) then 
            bindKey(v, Key, "down", BindKeyFunction) 
        end 
    end 
end) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    if isObjectInACLGroup("user."..getAccountName(account), aclGetGroup(Group)) then 
        bindKey(source, Key, "down", BindKeyFunction) 
    end  
end) 
  
function BindKeyFunction(plr) 
    outputChatBox("Hello World", plr, 255, 255, 0) 
end 

Edited by Guest

skype : 011101000110111000110110011001010110110000110000001110010011000000111001

Posted
@ мя.тη6єℓ : ما تحققت انه اللاعب مسجل !

مو شرط دائما اسوي كذا ولا يطلع أخطاء

skype : 011101000110111000110110011001010110110000110000001110010011000000111001

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