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

Wysłany: 2021-09-08, 22:08


TheBestv4

Przyszły programista LUA






Wiek: 30
Na forum: 2024 dni
Posty: 52
Nick w MP: Absolwent

Piwa: 838

Respekt: 50

Kod:

addEventHandler("onMarkerHit", getRootElement(), function(hit, md)
if getElementData(source, "cpn") == true then
if not getElementData(hit, "cpn:mapistolet") then
setElementData(hit, "cpn:mialdm", getControlState(hit, "fire"))
giveWeapon(hit, 32, 10, false)
toggleControl(plr,"fire",false)
toggleControl(plr,"aim_weapon",false)
toggleControl(source,"fire",false)
tooggleControl(source,"action",false)
toggleControl(hit,"fire",false)
tooggleControl(hit,"action",false)
setElementData(hit, "cpn:mapistolet", false)
local x, y, z = getElementPosition(source)
setElementData(hit, "cpn:kordyx", x)
setElementData(hit, "cpn:kordyy", y)
setElementData(hit, "cpn:kordyz", z+0.85)
toggleControl(hit, "fire", false)
toggleControl(hit, "aim_weapon", false)
else
takeWeapon(hit, 32)
toggleControl(plr,"fire",true)
toggleControl(plr,"aim_weapon",true)
toggleControl (source,"fire",true)
toggleControl(source,"fire",true)
tooggleControl(source,"action",true)
toggleControl(hit,"fire",true)
tooggleControl(hit,"action",true)
setControlState(hit, "fire", true)
setElementData(hit, "cpn:mapistolet", nil)
toggleControl(hit, "fire", getElementData(hit, "cpn:mialdm"))
setElementData(hit, "cpn:kordyx", nil)
setElementData(hit, "cpn:kordyy", nil)
setElementData(hit, "cpn:kordyz", nil)
end
end
end)


Pom0?e kto? z tym?
Zrob to kto? tak ?e jak robi weapon take to mo?na strzela? a jak nadaje bro?
to nie mo?na strzela?

Ja pr?bowa?em na mas? sposob?w i nie dzia?a...

[ Dodano: 2021-09-13, 18:30 ]
Do zamkni?cia.

Postaw piwo autorowi tego posta
 

 
Tagi: p0moc :: kodem
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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