[YARDIM]butona işlev verme

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı BulleT

  • Yeni Üye
  • *
    • İleti: 35
: 09 Ocak 2021, 15:04:18
arkadaşlar butona nasıl işlev verebilirim server dosyası bu:

Kod
function timer (oyuncu, cmd, paraMiktari)
    if not tonumber(paraMiktari) then
    outputChatBox("Wrong usage!", oyuncu, 255, 0, 0,true)
    return end
    oyuncuCek = {}
    for _,g in ipairs(getElementsByType("player")) do
    table.insert(oyuncuCek, getPlayerName(g))
    end
    randomCek = math.random(1, #oyuncuCek)
    kazanan = oyuncuCek[randomCek]
    outputChatBox("[INFO] #ffffffGiveaway event starting in 5 seconds for #00ff00$"..paraMiktari.." #ffffffby "..getPlayerName(oyuncu).."", root, 255, 125, 0,true)
    setTimer ( function()
outputChatBox("[INFO] #ffffff5", root, 255, 125, 0,true)
end, 1000, 1 )
setTimer ( function()
outputChatBox("[INFO] #ffffff4", root, 255, 125, 0,true)
    end, 2000, 1 )
setTimer ( function()
outputChatBox("[INFO] #ffffff3", root, 255, 125, 0,true)
    end, 3000, 1 )
setTimer ( function()
outputChatBox("[INFO] #ffffff2", root, 255, 125, 0,true)
    end, 4000, 1 )
setTimer ( function()
outputChatBox("[INFO] #ffffff1", root, 255, 125, 0,true)
    end, 5000, 1 )
setTimer ( function()
    outputChatBox("[INFO] #990033Winner is: #ffffff"..kazanan.."" , root, 255, 125, 0,true)
    end, 6000, 1 )
    givePlayerMoney(getPlayerFromName(kazanan), paraMiktari)
    oyuncuCek = {}
    end
    addCommandHandler("giveaway", timer)

« Son Düzenleme: 11 Ocak 2021, 21:25:12 Gönderen: BulleT »
 


MTASATURK

[YARDIM]butona işlev verme
« : 09 Ocak 2021, 15:04:18 »