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

Wysłany: 2018-11-27, 20:22


Nelsonn







Wiek: 28
Na forum: 5090 dni
Posty: 43
Nick w MP: Nelson

Piwa: 3

Respekt: 50

Witam, problem polega na wy?wietlaniu ca?y czas fists a zabijam gracza inn? broni? ni? r?ce, jaki? pomys??

if killer then
        local kaccount = getPlayerAccount(killer)
        
        if not getElementData(source, "bandit") then
            addPlayerStats(killer, "humanity", math.random(-2500, -1000))
        else
            addPlayerStats(killer, "humanity", math.random(1000, 2500))
        end
        
        setElementData(killer, "murders", getElementData(killer, "murders") + 1)
        setElementData(killer, "murders_total", getElementData(killer, "murders_total") + 1)

        setAccountData(kaccount, "murders_total", getElementData(killer, "murders_total"))
        
        if getElementData(killer, "humanity") < 0 then
            setElementData(killer, "bandit", true)
        end
        
        if getElementData(source, "bandit") == true then
            setElementData(killer, "banditskilled", getElementData(killer, "banditskilled") + 1)
        end
        
        if headshot == true then
            setElementData(killer, "headshots", getElementData(killer, "headshots") + 1)
        end
        
        triggerClientEvent("onRollMessageStart", getRootElement(), ""..getPlayerName(source).." was killed by a player "..getPlayerName(killer).." ("..(getElementData(killer, "weapon") or "fists")..")", 0, 22, 255, "died")
    else
        triggerClientEvent("onRollMessageStart", getRootElement(), ""..getPlayerName(source).." died ", 0, 22, 255, "died")
    end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-27, 20:32


Wilq







Wiek: 24
Na forum: 4570 dni
Posty: 3409

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Gdzie ustawiasz elementDat? 'weapon'?

Je?li oczekujesz pomocy to chocia? wstawiaj ca?y kod tak, aby by? on czytelny.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-27, 23:18


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3351 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

po co sobie komplikowa? ?ycie;

if killer then
        local kaccount = getPlayerAccount(killer)
        
        if not getElementData(source, "bandit") then
            addPlayerStats(killer, "humanity", math.random(-2500, -1000))
        else
            addPlayerStats(killer, "humanity", math.random(1000, 2500))
        end
        
        setElementData(killer, "murders", getElementData(killer, "murders") + 1)
        setElementData(killer, "murders_total", getElementData(killer, "murders_total") + 1)

        setAccountData(kaccount, "murders_total", getElementData(killer, "murders_total"))
        
        if getElementData(killer, "humanity") < 0 then
            setElementData(killer, "bandit", true)
        end
        
        if getElementData(source, "bandit") == true then
            setElementData(killer, "banditskilled", getElementData(killer, "banditskilled") + 1)
        end
        
        if headshot == true then
            setElementData(killer, "headshots", getElementData(killer, "headshots") + 1)
        end
        
        triggerClientEvent("onRollMessageStart", getRootElement(), ""..getPlayerName(source).." was killed by a player "..getPlayerName(killer).." ("..getWeaponNameFromID(getPedWeapon(killer)..")", 0, 22, 255, "died")
    else
        triggerClientEvent("onRollMessageStart", getRootElement(), ""..getPlayerName(source).." died ", 0, 22, 255, "died")
    end


Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-29, 23:41


Nelsonn







Wiek: 28
Na forum: 5090 dni
Posty: 43
Nick w MP: Nelson

Piwa: 3

Respekt: 50

TeeNekk, Pokazuje ze jest ?le postawiony nawias.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-29, 23:58


TeeNekk

Cienzaruwka :v






Wiek: 23
Na forum: 3351 dni
Posty: 264
Nick w MP: TeeNekk.

Piwa: 919

Respekt: 110,5
Respekt: 110,5

gdzie dok?adnie? poka? ten b??d ca?y.

[ Dodano: 2018-11-29, 23:59 ]
dobra, sam znalaz?em b??d;
 triggerClientEvent("onRollMessageStart", getRootElement(), ""..getPlayerName(source).." was killed by a player "..getPlayerName(killer).." ("..getWeaponNameFromID(getPedWeapon(killer)..")", 0, 22, 255, "died")

zamie? na;
  triggerClientEvent("onRollMessageStart", getRootElement(), ""..getPlayerName(source).." was killed by a player "..getPlayerName(killer).." ("..getWeaponNameFromID(getPedWeapon(killer))..")", 0, 22, 255, "died")


Podpis
Pomogłem Ci
? Może zostawiłbyś za to piwko, lub respekt? Dzięki!
Mój projekt:
?
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Nelsonn
Wysłany: 2018-11-30, 00:53


Nelsonn







Wiek: 28
Na forum: 5090 dni
Posty: 43
Nick w MP: Nelson

Piwa: 3

Respekt: 50

Dzia?a dzi?ki :p

Postaw piwo autorowi tego posta
 

 
Tagi: informacja :: zginięciu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Informacja o zginięciu Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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