Jump to content

ابي مساعده


Recommended Posts

  
function onGuiClick (button, state, absoluteX, absoluteY) 
if ( source ==  shop222 ) then  
 guiSetVisible ( Window ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
sBatEl = getElementData(getLocalPlayer(),"superBat") 
if sBatEl == false then 
local PlayerMoney = getPlayerMoney() 
    if ( PlayerMoney > 2000 ) then 
        takePlayerMoney(2000) 
        outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true)   
        outputChatBox("Go Go Go !!!",255,0,0) 
        setElementData(getLocalPlayer(),"superBat",true) 
        triggerServerEvent("sBat", getLocalPlayer()) 
function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
            if ( weapon ==  5  and getElementType(hitElement)=="player" ) then  
            triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
            end 
end 
addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
    else 
        outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
    end 
else 
    outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

ابي الاعب اذا يظرب بالعصا الي معه يموت الاعب التاني

Bat

وشكرا

Link to comment
  
function onGuiClick (button, state, absoluteX, absoluteY) 
if ( source ==  shop222 ) then  
 guiSetVisible ( Window ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
sBatEl = getElementData(getLocalPlayer(),"superBat") 
if sBatEl == false then 
local PlayerMoney = getPlayerMoney() 
    if ( PlayerMoney > 2000 ) then 
        takePlayerMoney(2000) 
        outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true)   
        outputChatBox("Go Go Go !!!",255,0,0) 
        setElementData(getLocalPlayer(),"superBat",true) 
        triggerServerEvent("sBat", getLocalPlayer()) 
function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
            if ( weapon ==  5  and getElementType(hitElement)=="player" ) then  
            triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
            end 
end 
addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
    else 
        outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
    end 
else 
    outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

ابي الاعب اذا يظرب بالعصا الي معه يموت الاعب التاني

Bat

وشكرا

وضح اكثر ما فهمتك ؟؟؟ :?::?:

تقصد اذا لاعب ضرب الاعب الثاني بالعصا يموت على طول ؟

Link to comment
    function onGUIClick(button, state, absoluteX, absoluteY) 
        if ( source ==  shop222 ) then 
            guiSetVisible ( Window ,false ) 
                showCursor (false ) 
                    guiSetInputEnabled(false) 
        end 
    end 
    addEventHandler("onClientGUIClick", root, onGUIClick) 
     
    sBatEl = getElementData(getLocalPlayer(),"superBat") 
    if sBatEl == false then 
    local PlayerMoney = getPlayerMoney() 
        if ( PlayerMoney > 2000 ) then 
            takePlayerMoney(2000) 
            outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true)  
            outputChatBox("Go Go Go !!!",255,0,0) 
            setElementData(getLocalPlayer(),"superBat",true) 
            triggerServerEvent("sBat", getLocalPlayer()) 
    function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                if ( weapon == 5 and getElementType(hitElement)=="player" ) then 
                    triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                end 
    end 
    addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
     
    setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
        else 
            outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
        end 
    else 
        outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
    end 
    addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

الكود صحيح بس انت ناسي

end

و

بعض الاقواس صلحتها لك

Link to comment

client

        function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
            end 
        end 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
        
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
        
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
        else 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        end 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

server

addEvent("killPed",true) 
addEventHandler("killPed", root, 
function(hitElement,weapon) 
    if ( weapon == 5 and getElementType(hitElement)=="player" ) then 
        if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then 
            killPed(hitElement,source,weapon) 
        end 
    end 
end) 

Link to comment
client
        function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
            end 
        end 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
        
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
        
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
        else 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        end 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

server

addEvent("killPed",true) 
addEventHandler("killPed", root, 
function(hitElement,weapon) 
    if ( weapon == 5 and getElementType(hitElement)=="player" ) then 
        if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then 
            killPed(hitElement,source,weapon) 
        end 
    end 
end) 

Fix

--Client Side--

       function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
            end 
        end 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
  
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  

Link to comment
client
        function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
            end 
        end 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
        
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
        
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
        else 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        end 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

server

addEvent("killPed",true) 
addEventHandler("killPed", root, 
function(hitElement,weapon) 
    if ( weapon == 5 and getElementType(hitElement)=="player" ) then 
        if not ( getPlayerTeam(source) == getPlayerTeam(hitElement) ) then 
            killPed(hitElement,source,weapon) 
        end 
    end 
end) 

Fix

--Client Side--

       function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
            end 
        end 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
  
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  

التصحيح

function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
  
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

Link to comment

التصحيح

function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
  
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

'end' expected (to close 'if' at line 2) near ''

fix

  
function onGUIClick(button, state, absoluteX, absoluteY) 
            if ( source ==  shop222 ) then 
                guiSetVisible ( Window ,false ) 
                    showCursor (false ) 
                        guiSetInputEnabled(false) 
end 
end 
        addEventHandler("onClientGUIClick", root, onGUIClick) 
  
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 
  

Link to comment

Sorry

function onGuiClick (button, state, absoluteX, absoluteY) 
  
if ( source ==  shop222 ) then 
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

Link to comment
Sorry
function onGuiClick (button, state, absoluteX, absoluteY) 
  
if ( source ==  shop222 ) then 
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

correct

    function onGuiClick (button, state, absoluteX, absoluteY) 
      
    if ( source ==  shop222 ) then 
            sBatEl = getElementData(getLocalPlayer(),"superBat") 
            if sBatEl == false then 
            local PlayerMoney = getPlayerMoney() 
                if ( PlayerMoney >= 2000 ) then 
                    takePlayerMoney(2000) 
                    outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                    outputChatBox("Go Go Go !!!",255,0,0) 
                    setElementData(getLocalPlayer(),"superBat",true) 
                    triggerServerEvent("sBat", getLocalPlayer()) 
            function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                            triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                        end 
            end 
            addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
      
            setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
                else 
                    outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
                end 
                outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
    end 
    end 
            addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

Link to comment
Sorry
function onGuiClick (button, state, absoluteX, absoluteY) 
  
if ( source ==  shop222 ) then 
        sBatEl = getElementData(getLocalPlayer(),"superBat") 
        if sBatEl == false then 
        local PlayerMoney = getPlayerMoney() 
            if ( PlayerMoney > 2000 ) then 
                takePlayerMoney(2000) 
                outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                outputChatBox("Go Go Go !!!",255,0,0) 
                setElementData(getLocalPlayer(),"superBat",true) 
                triggerServerEvent("sBat", getLocalPlayer()) 
        function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                        triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                    end 
        end 
        addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
  
        setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
            else 
                outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
            end 
            outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
        addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

correct

    function onGuiClick (button, state, absoluteX, absoluteY) 
      
    if ( source ==  shop222 ) then 
            sBatEl = getElementData(getLocalPlayer(),"superBat") 
            if sBatEl == false then 
            local PlayerMoney = getPlayerMoney() 
                if ( PlayerMoney >= 2000 ) then 
                    takePlayerMoney(2000) 
                    outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true) 
                    outputChatBox("Go Go Go !!!",255,0,0) 
                    setElementData(getLocalPlayer(),"superBat",true) 
                    triggerServerEvent("sBat", getLocalPlayer()) 
            function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
                            triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
                        end 
            end 
            addEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superFist) 
      
            setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onClientPlayerWeaponFire", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
                else 
                    outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
                end 
                outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
    end 
    end 
            addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

There are correct?

Link to comment
This does not trigger for projectiles based, or melee weapons.

لعصى؟ onClientPlayerWeaponFire أفنت

خخخخخخ

أكوادكم كلها خطأ

onPlayerDamage أستعمل الأفنت

  
function onGuiClick (button, state, absoluteX, absoluteY) 
if ( source ==  shop222 ) then 
 guiSetVisible ( Window ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
sBatEl = getElementData(getLocalPlayer(),"superBat") 
if sBatEl == false then 
local PlayerMoney = getPlayerMoney() 
    if ( PlayerMoney > 2000 ) then 
        takePlayerMoney(2000) 
        outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true)  
        outputChatBox("Go Go Go !!!",255,0,0) 
        setElementData(getLocalPlayer(),"superBat",true) 
        triggerServerEvent("sBat", getLocalPlayer()) 
function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
            if ( weapon ==  5  and getElementType(hitElement)=="player" ) then 
            triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
            end 
end 
addEventHandler("onPlayerDamage", getLocalPlayer(), superFist) 
setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onPlayerDamage", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
    else 
        outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
    end 
else 
    outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

ما اشتغل

Link to comment
This does not trigger for projectiles based, or melee weapons.

لعصى؟ onClientPlayerWeaponFire أفنت

خخخخخخ

أكوادكم كلها خطأ

onPlayerDamage أستعمل الأفنت

  
function onGuiClick (button, state, absoluteX, absoluteY) 
if ( source ==  shop222 ) then 
 guiSetVisible ( Window ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
sBatEl = getElementData(getLocalPlayer(),"superBat") 
if sBatEl == false then 
local PlayerMoney = getPlayerMoney() 
    if ( PlayerMoney > 2000 ) then 
        takePlayerMoney(2000) 
        outputChatBox("SuperBat Well End After #ffffff[#00ff00 1:00#ffffff ] #ff0000Minutes",255,0,0,true)  
        outputChatBox("Go Go Go !!!",255,0,0) 
        setElementData(getLocalPlayer(),"superBat",true) 
        triggerServerEvent("sBat", getLocalPlayer()) 
function superBat(weapon,ammo,ammoInClip,hitX,hitY,hitZ,hitElement) 
            if ( weapon ==  5  and getElementType(hitElement)=="player" ) then 
            triggerServerEvent("killPed",getLocalPlayer(),hitElement,weapon) 
            end 
end 
addEventHandler("onPlayerDamage", getLocalPlayer(), superFist) 
setTimer(function ()setElementData(getLocalPlayer(),"superBat",false) removeEventHandler("onPlayerDamage", getLocalPlayer(), superBat) outputChatBox("*** [ Super Bat ] HAS END ***",255,255,0) end,35000,1, true) 
    else 
        outputChatBox("Error #ffff00You don't have #00ff00[ $2000 ] #ff0000 to buy SuperBat  #ffffff| #ffff00u have money #00ff00[ $".. PlayerMoney.. " ]",255,0,0,true) 
    end 
else 
    outputChatBox("Error You Already Have Super Bat !!!",255,0,0) 
end 
end 
end 
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) 

ما اشتغل

removeEventHandler("onPlayerDamage", getLocalPlayer(), superBat) 

؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟

ايش ذي ؟

removeEventHandler("onPlayerDamage", root, superBat) 

Link to comment

خخخخخخخخخخخخخخ وش اقول بس

onPlayerDamage 

سيرفر وانتو حاطينها كلينت

بعدين يا كيمو عندي لك سؤال، انت مسوي شوب كامل ومو عارف تسوي اذا ضرب بعصا يموت!!!!!!1

Link to comment
خخخخخخخخخخخخخخ وش اقول بس
onPlayerDamage 

سيرفر وانتو حاطينها كلينت

بعدين يا كيمو عندي لك سؤال، انت مسوي شوب كامل ومو عارف تسوي اذا ضرب بعصا يموت!!!!!!1

سؤال صعب :wink:

Link to comment
خخخخخخخخخخخخخخ وش اقول بس
onPlayerDamage 

سيرفر وانتو حاطينها كلينت

بعدين يا كيمو عندي لك سؤال، انت مسوي شوب كامل ومو عارف تسوي اذا ضرب بعصا يموت!!!!!!1

الصراحه في شوبي القديم اكثر الكودات جاهزه

بس سويت واحد جديد به اكثر الكودات مو جاهزه

في سيرفر عرب

3rb

شوي شوي اصير احسن في المودات وما بصير من نفسي بصير من مساعدتكم

Link to comment

كودك طويل انا بعطك مثال

server-side:

addEventHandler("onPlayerJoin",getRootElement(), 
function() 
setElementData(source,"thePlrPerBat",tostring("no")) 
end 
) 
addEvent("sBat",true) 
addEventHandler("sBat",getRootElement(), 
setElementData(source,"thePlrPerBat",tostring("yes")) 
setTimer(setElementData,120000,1,source,"thePlrPerBat",tostring("no")) 
  
end 
) 
addEventHandler ( "onPlayerDamage", getRootElement (), 
 function ( attacker, weapon, bodypart, loss )  
 if (weapon == 5 ) then 
if ( getElementData(attacker,"thePlrPerBat") == tostring("yes") ) then 
    if ( bodypart  ) then  
            outputChatBox ( "You Killed by Super Bat",source, 255, 255, 0 )  
        killPed ( source, attacker, weapon, bodypart )  
    end 
end 
end 
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...