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

Wysłany: 2015-11-27, 16:28


Kradus







Wiek: 28
Na forum: 4169 dni
Posty: 100
Nick w MP: Salldan

Piwa: 78

Respekt: 50

Ot?? posiadam taki kod on oczywi?cie nie dzia?a ale ja nie wiem gdzie jest b??d
function postrzal attackerbodypartthePlayer )
    if ( bodypart == then
    local hp getElementHealth(localPlayer)
    if hp <= 6 then
        toggleAllControls thePlayerfalse )
        setTimer toggleAllControlsfreezeTime70thePlayertrue ) 
        setPedAnimation thePlayer"CRACK""crckidle1")
    end
end
end
addEventHandler("onClientPlayerDamage"postrzalattacker)


Ot?? to ma dzia?a? na zasadzie, ?e je?li kto? ma 6 HP albo mniej to aby mu blokowa?o kontrol? oraz dawa?o animk?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-27, 17:00


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4330 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

zmien
local hp getElementHealth(localPlayer)

na
local hp getElementHealth(thePlayer)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-27, 18:07


Kradus







Wiek: 28
Na forum: 4169 dni
Posty: 100
Nick w MP: Salldan

Piwa: 78

Respekt: 50

Nie dzia?a jakie? sugestie?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-27, 18:31


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4134 dni
Posty: 445
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1033

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
"BlackTen" napisał/a:

zmien
local hp getElementHealth(localPlayer)

na
local hp getElementHealth(thePlayer)


To akurat mia? dobrze, bo localPlayer w?a?nie jest do strony clienta..

Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-27, 19:01


#404







Wiek: 26
Na forum: 4772 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Wat wat wat... Co wy tu majstrujecie ?

Order geniusza i uwa?nego czytania dla ka?dego kto tu pomaga?...


Powinno takie co? dzia?a?, je?eli nie wpisz "/debugscript 3" i zrestartuj skrypt - no i oczywi?cie podaj b??dy jakie si? pojawi?...


function postrzal attackerweaponbodypartloss )
    if source ~= localPlayer then return end
    
    hp getElementHealth(localPlayer)
    if (hp loss) < 6  then
    
    toggleAllControls(false)
        setTimer(toggleAllControls30001true)
    setPedAnimation localPlayer"CRACK""crckidle1")
        setTimer(setPedAnimation30001localPlayernilnil)
        
    end
end
addEventHandler("onClientPlayerDamage"getRootElement(), postrzal )


Postaw piwo autorowi tego posta
 

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


Kradus







Wiek: 28
Na forum: 4169 dni
Posty: 100
Nick w MP: Salldan

Piwa: 78

Respekt: 50

I takim to sposobem DestroY zako?czy? ten problem. Do zamkni?cia. Dzi?ki DestroY

Postaw piwo autorowi tego posta
 

 
Tagi: postrzał
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Postrzał 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