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

Wysłany: 2015-05-22, 16:32


Tomakan

Człowiek






Wiek: 26
Na forum: 4202 dni
Posty: 94
Nick w MP: Tomakan

Piwa: 5

Respekt: 50

Mam taki kod:
    local theWeapon1 = getPedWeapon (source, 1)
    local theWeapon2 = getPedWeapon (source, 2)
    local theWeapon3 = getPedWeapon (source, 3)
    local theWeapon4 = getPedWeapon (source, 4)
    local theWeapon5 = getPedWeapon (source, 5)
    local theWeapon6 = getPedWeapon (source, 6)
    local theWeapon7 = getPedWeapon (source, 7)
    local theWeapon8 = getPedWeapon (source, 8)
    local theWeapon9 = getPedWeapon (source, 9)
    local theWeapon10 = getPedWeapon (source, 10)
    local theWeapon11 = getPedWeapon (source, 11)
    local theWeapon12 = getPedWeapon (source, 12)
    
    local weaponAmmo1 = getPedTotalAmmo (source, 1)
    local weaponAmmo1 = getPedTotalAmmo (source, 2)
    local weaponAmmo1 = getPedTotalAmmo (source, 3)
    local weaponAmmo1 = getPedTotalAmmo (source, 4)
    local weaponAmmo1 = getPedTotalAmmo (source, 5)
    local weaponAmmo1 = getPedTotalAmmo (source, 6)
    local weaponAmmo1 = getPedTotalAmmo (source, 7)
    local weaponAmmo1 = getPedTotalAmmo (source, 8)
    local weaponAmmo1 = getPedTotalAmmo (source, 9)
    local weaponAmmo1 = getPedTotalAmmo (source, 10)
    local weaponAmmo1 = getPedTotalAmmo (source, 11)
    local weaponAmmo1 = getPedTotalAmmo (source, 12)
    
    setTimer (giveWeapon, 4000, 1, source, theWeapon1, tonumber(weaponAmmo1), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon2, tonumber(weaponAmmo2), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon3, tonumber(weaponAmmo3), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon4, tonumber(weaponAmmo4), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon5, tonumber(weaponAmmo5), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon6, tonumber(weaponAmmo6), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon7, tonumber(weaponAmmo7), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon8, tonumber(weaponAmmo8), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon9, tonumber(weaponAmmo9), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon10, tonumber(weaponAmmo10), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon11, tonumber(weaponAmmo11), true)
    setTimer (giveWeapon, 4000, 1, source, theWeapon12, tonumber(weaponAmmo12), true)


Jest on umieszczony w onPlayerWasted, wszystko dzia?a. Jedynym minusem jest to, ?e niby pobiera t? amunicj?, jednak nie daje tyle ile powinno, np mam 163, a przywraca po ?mierci 0.30 do ka?acha :shock: Pomys?y?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-22, 17:06


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

Spr?buj zrobi? to tabelowo i zap?tli?. Mo?e b?dzie optymalniej i wtedy poznamy b??d.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-22, 18:13


Tomakan

Człowiek






Wiek: 26
Na forum: 4202 dni
Posty: 94
Nick w MP: Tomakan

Piwa: 5

Respekt: 50

M?g?by? dopom?c i powiedzie? jak wstawi? to w tabel??

[ Dodano: 2015-05-22, 18:16 ]
Naprawi?em, zrobi?em dodatkow? funkcje giveWeaponAmmo czy jak tam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-05-22, 19:06


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

[clo]

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: giveplayerweapon :: nie :: daje :: całej :: amunicji.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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