Jump to content

x[ تصحيح كود ]x القتل


Mers[o]n

Recommended Posts

انا عملت لوحة توزيع قتل زومبي 

* دلوقتي انا عملت كل حاجة

لكن ف الدبيق مش ظاهر حاجة

والتاب اتختفا تماما 

الكود

function kills (Name)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

Edited by Mers[o]n
Link to comment
1 hour ago, Mers[o]n said:

انا عملت لوحة توزيع قتل زومبي 

* دلوقتي انا عملت كل حاجة

لكن ف الدبيق مش ظاهر حاجة

والتاب اتختفا تماما 

الكود


function kills (Name)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

وين الكلنت اولا ؟

Link to comment
23 minutes ago, #Himoo said:

وين الكلنت اولا ؟

اية الي دخل الكلنيت ؟

give_kills = guiCreateButton(334, 53, 119, 26, "Give", false, wnd)
        guiSetFont(give_kills, "default-bold-small")
        guiSetProperty(give_kills, "NormalTextColour", "FFFFFFFF")

        zombieKills = guiCreateEdit(95, 53, 229, 22, "", false, wnd)



addEventHandler ( "onClientGUIClick", root,
function ()
if source == give_kills then
local zombieKills = guiGetText(zombieKills)
local Name = getPlayerName(getLocalPlayer())
triggerServerEvent("kils",getRootElement(),zombieKills,Name)
end

)

 

Edited by Mers[o]n
Link to comment
Just now, Mers[o]n said:

اية الي دخل الكلنيت ؟

 

لانك مش حاطط zombieKills
بالسيرفر المفروض تحطها جنب function ( name , zombieKills)
تصير كذا

يعني الكود يصير هيك
 

function kills (Name, zombieKills)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

واسف مابي احطمك لاكنك زارف الكود من المود حق فادي فانديتيا حق Gta-Is

  • Confused 1
Link to comment
Just now, Mers[o]n said:

مش فاهم !

function kills (Name, zombieKills)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

+ تراك زارف الكود

+ لو تبيه يجيب عدد الكيلز الي وزعه يصير هيك الكود
 

function kills (Name, zombieKills)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! :"..zombieKills.." #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

Link to comment
3 minutes ago, Mers[o]n said:

نفس المشكلة .. انا لما جيت كتبت العدد اللي انا عايز اوزعة كتب لي

تم التوزيع بنجاح * 

لكن مش ظاهر حاجة في التاب ولما قتلت زومبي ظهر 1

العيب منين !!!

@#Himoo

جرب
 

function kills (zombieKills, Name)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! :"..zombieKills.." #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

واذا ما ضبط يمكن الداتا تكون مش مضبوطة حقت الزومبي

Link to comment

نـــفس آلمشكلة .. !

انا واخد الكود دة 

 setElementData(v,"kills",tonumber(zombieKills))

من

exports.scoreboard:addScoreboardColumn('Zombie kills')
 
addEvent("onZombieWasted",true)
addEventHandler("onZombieWasted",root,
function (killer)
    givePlayerMoney(killer,50)
    addPlayerZombieKills(killer)
 
end)


function addPlayerZombieKills(killer)
    local account = getPlayerAccount(killer)
    if isGuestAccount(account) then return end
    local zombieKills = getAccountData(account,"Zombie kills")
    if not zombieKills then setAccountData(account,"Zombie kills",0) end
    setAccountData(account,"Zombie kills",tonumber(zombieKills)+1)
end


addEventHandler("onPlayerLogin",root,
function ()
    local account = getPlayerAccount(source)
    if isGuestAccount(account) then return end
    local zombieKills = getAccountData(account,"Zombie kills")
    if zombieKills then
        setElementData(source,"Zombie kills",tostring(zombieKills))
    else
        setElementData(source,"Zombie kills",0)    
 
end
end)

 

Link to comment
2 minutes ago, Mers[o]n said:

نـــفس آلمشكلة .. !

انا واخد الكود دة 


 setElementData(v,"kills",tonumber(zombieKills))

من


exports.scoreboard:addScoreboardColumn('Zombie kills')
 
addEvent("onZombieWasted",true)
addEventHandler("onZombieWasted",root,
function (killer)
    givePlayerMoney(killer,50)
    addPlayerZombieKills(killer)
 
end)


function addPlayerZombieKills(killer)
    local account = getPlayerAccount(killer)
    if isGuestAccount(account) then return end
    local zombieKills = getAccountData(account,"Zombie kills")
    if not zombieKills then setAccountData(account,"Zombie kills",0) end
    setAccountData(account,"Zombie kills",tonumber(zombieKills)+1)
end


addEventHandler("onPlayerLogin",root,
function ()
    local account = getPlayerAccount(source)
    if isGuestAccount(account) then return end
    local zombieKills = getAccountData(account,"Zombie kills")
    if zombieKills then
        setElementData(source,"Zombie kills",tostring(zombieKills))
    else
        setElementData(source,"Zombie kills",0)    
 
end
end)

 

اجل هيك يصير
جرب وعطني خبر
 

function kills (zombieKills, Name)
for i,v in ipairs(getElementsByType("player")) do

      setElementData(v,"Zombie kills",tonumber(zombieKills))
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! :"..zombieKills.." #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

Link to comment

واذا ما اشتغل جرب دا
 

function kills (zombieKills, Name)
for i,v in ipairs(getElementsByType("player")) do

setElementData(v,"Zombie kills",(getElementData(v,"Zombie kills")or 0 )+ zombieKills)
		end
exports["guimessages"]:outputServer ( getRootElement(),"[Server] : #C00000"..Name.."#00FF00 Has Give All Players #FFFF00[ #66AA0D ZombesKillS!! :"..zombieKills.." #FFFF00 ]", 0, 255, 255,true)
playSoundFrontEnd(getRootElement(), 44)
end
addEvent("kils",true)
addEventHandler("kils",getRootElement(), kills)

 

اوكي جرب دا

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