#Major . Posted November 28, 2018 Share Posted November 28, 2018 function GHook(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} outputChatBox("!") if getElementType(args[1]) == 'player' then SetWeapon(args[1]) end end addDebugHook('postFunction', GHook, {'giveWeapon','setWeaponAmmo','takeWeapon'}) بختصار ليه الكود م يشتغل ع الفنكشنات هذي معنه يشتغل مع اي فنكشن غيرها؟ Link to comment
Master_MTA Posted December 2, 2018 Share Posted December 2, 2018 function GHook(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} outputChatBox("!") if functionName=='giveWeapon' or functionName=='setWeaponAmmo' or functionName=='takeWeapon' then if #args==0 then return end if getElementType(args[1]) == 'player' then SetWeapon(args[1]) end end end addDebugHook('preFunction', GHook) Link to comment
#Major . Posted December 3, 2018 Author Share Posted December 3, 2018 20 hours ago, Master_MTA said: function GHook(sourceResource, functionName, isAllowedByACL, luaFilename, luaLineNumber, ...) local args = {...} outputChatBox("!") if functionName=='giveWeapon' or functionName=='setWeaponAmmo' or functionName=='takeWeapon' then if #args==0 then return end if getElementType(args[1]) == 'player' then SetWeapon(args[1]) end end end addDebugHook('preFunction', GHook) م تحس كذا بيسبب لاق؟ Link to comment
Master_MTA Posted December 3, 2018 Share Posted December 3, 2018 6 hours ago, *RayaN-Alharbi. said: م تحس كذا بيسبب لاق؟ جرب بنفسك سوي تحقق من الفريم كل شوي Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now