Jump to content

تصحيح كود


Recommended Posts

السلام عليكم

وش الخطأ في الكود

addEventHandler("onResourceStart",getRootElement(), 
    function () 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function () 
     accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end) 
     
  

Link to comment
السطر الاول getRootElement() اي مود يشتغل تتنفذ الوظيفة

والسطر الثامن thePlayer غير معرف حط source

سويت كذا وماشتغل

addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function () 
     accName = getAccountName ( getPlayerAccount ( source ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then  
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end) 

والدي بج ماعطاني شيئ

Link to comment
addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function (thePlayer) 
     accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end)  

Link to comment
addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function (thePlayer) 
     accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end)  

[2012-12-20 23:27:24] WARNING: UpDate_Weapon\Server.lua:8: Bad argument @ 'getPlayerAccount' [Expected element at argument 1] 
[2012-12-20 23:27:24] WARNING: UpDate_Weapon\Server.lua:8: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] 
[2012-12-20 23:27:24] ERROR: UpDate_Weapon\Server.lua:9: attempt to concatenate global 'accName' (a boolean value) 

Link to comment
addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
if source = getThisResource() then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function () 
     accName = getAccountName ( getPlayerAccount (source) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end)  

Link to comment
addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
if source = getThisResource() then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function () 
     accName = getAccountName ( getPlayerAccount (source) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end)  

then ماضبط طلع لي الخطأ سطر 3

Link to comment
addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
if source = getThisResource() then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function () 
     accName = getAccountName ( getPlayerAccount (source) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end)  

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        for i,v in ipairs(getElementsByType("player")) do 
            setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
        end 
    end 
) 
  
addEventHandler("onPlayerLogin", root, 
    function() 
        local accName = getAccountName( getPlayerAccount( source ) ) 
        if( isObjectInACLGroup("user."..accName, aclGetGroup( "Admin" )) )then 
            setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
        end 
    end 
) 

Link to comment
addEventHandler("onResourceStart",getResourceRootElement(), 
    function () 
if source = getThisResource() then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
end 
end) 
  
addEventHandler("onPlayerLogin",getRootElement(), 
    function () 
     accName = getAccountName ( getPlayerAccount (source) ) 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
    setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
    end 
    end)  

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        for i,v in ipairs(getElementsByType("player")) do 
            setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 30) 
        end 
    end 
) 
  
addEventHandler("onPlayerLogin", root, 
    function() 
        local accName = getAccountName( getPlayerAccount( source ) ) 
        if( isObjectInACLGroup("user."..accName, aclGetGroup( "Admin" )) )then 
            setWeaponProperty("mp5", "pro", "maximum_clip_ammo", 999999999) 
        end 
    end 
) 

ماضبط انا ابغاه يكون مايعشق للادمنية بس

Link to comment

server

addEventHandler("onPlayerLogin", root, 
    function() 
        local accName = getAccountName( getPlayerAccount( source ) ) 
        if( isObjectInACLGroup("user."..accName, aclGetGroup( "Admin" )) )then 
            triggerClientEvent(source,"king",source) 
        end 
    end 
) 

client

addEvent("king",true) 
addEventHandler("king",localPlayer, 
    function() 
        local weapon = getPedWeapon(localPlayer) 
        setWeaponProperty(weapon,"maximum_clip_ammo",999999999) 
    end 
) 

Link to comment
server
addEventHandler("onPlayerLogin", root, 
    function() 
        local accName = getAccountName( getPlayerAccount( source ) ) 
        if( isObjectInACLGroup("user."..accName, aclGetGroup( "Admin" )) )then 
            triggerClientEvent(source,"king",source) 
        end 
    end 
) 

client

addEvent("king",true) 
addEventHandler("king",localPlayer, 
    function() 
        local weapon = getPedWeapon(localPlayer) 
        setWeaponProperty(weapon,"maximum_clip_ammo",999999999) 
    end 
) 

ماضبط :(

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