Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2020-05-14, 11:29


Bol3k







Wiek: 20
Na forum: 2233 dni
Posty: 6
Nick w MP: Fepher



Respekt: 50

Cze??! Nie wiem jak? komende wpisa? aby to dzia?a?o

function dpln(gracz, _, graczhere, ile)
if getElementData(gracz, "duty") == 4 and graczhere and ile then
local graczhere = findPlayer(gracz, graczhere)
if not graczhere then return end
ile = string.format("%1.2f", ile)
setElementData(graczhere, "pieniadze", getElementData(graczhere, "pieniadze")+ile)
exports["w_noti"]:noti("Da?e? "..ile.." PLN graczu "..getPlayerName(graczhere), gracz)
exports["w_noti"]:noti("Otrzyma?e? "..ile.." PLN od "..getPlayerName(gracz), graczhere)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-14, 12:01


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Komend? definiujesz w pierwszym argumencie funkcji

Więcej informacji znajdziesz w Wikipedii MTA:

addCommandHandler


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-14, 21:38


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Komenda /daj <komu> <ile> zdefiniowana :
function dpln(gracz_graczhereile)
    if getElementData(gracz"duty") == and graczhere and ile then
        local graczhere findPlayer(graczgraczhere)
        if not graczhere then return end
        ile string.format("%1.2f"ile)
        setElementData(graczhere"pieniadze"getElementData(graczhere"pieniadze")+ile)
        exports["w_noti"]:noti("Da?e? "..ile.." PLN graczu "..getPlayerName(graczhere), gracz)
        exports["w_noti"]:noti("Otrzyma?e? "..ile.." PLN od "..getPlayerName(gracz), graczhere)
    end
end
addCommandHandler("daj",dpln)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-16, 01:45


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3061 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

addCommandHandler("dpln", function(gracz_graczhereile)
    if getElementData(gracz"duty") == and graczhere and ile then
    local graczhere findPlayer(graczgraczhere)
    if not graczhere then return end
    ile string.format("%1.2f"ile)
    setElementData(graczhere"pieniadze"getElementData(graczhere"pieniadze")+ile)
    exports["w_noti"]:noti("Da?e? "..ile.." PLN graczu "..getPlayerName(graczhere), gracz)
    exports["w_noti"]:noti("Otrzyma?e? "..ile.." PLN od "..getPlayerName(gracz), graczhere)
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-05-19, 19:15


Wydra







Wiek: 25
Na forum: 2207 dni
Posty: 10
Nick w MP: Xsardnes



Respekt: 50

nie zdefinowany addCommandHandler : https://wiki.multitheftauto.com/wiki/addCommandHandler

Postaw piwo autorowi tego posta
 

 
Tagi: jaką :: komende :: mam :: wpisac :: działało?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jaką komende mam wpisac by to działało? Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku