Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: celowanie
1. Celowanie do peda
Cze??, pisz? skrypt na napady i chcia?bym zrobi?, ?e gdy gracz przestanie celowa? napad si? anuluje pr?bowa?em doda? elsa, aczkolwiek dzia?a to tylko wtedy gdy stoimy twarz? do peda, a nie o to mi chodzi

kod:
function isPedAiming (thePedToCheck)
    if 
isElement(thePedToCheckthen
        
if getElementType(thePedToCheck) == "player" then
            
if getPedTask(thePedToCheck"secondary"0) == "TASK_SIMPLE_USE_GUN" or isPedDoingGangDriveby(thePedToCheckthen
                
return true
            end
        end
    end
    
return false
end

ped 
createPed 982430.3, -2082.413.5 )
function 
robbery(target)
    if 
target == localPlayer then return end
    
if target == ped and not animacja and not animacja2 then
        
if isPedAiming(localPlayerthen
            animacja 
setPedAnimation ped"ped""handsup", -1falsefalse )
            
setTimer ( function()
                
animacja2 setPedAnimation ped"GRAVEYARD""mrnF_loop", -1truetrue )
            
end5000)
        
end
    end
end
addEventHandler
"onClientPlayerTarget"rootrobbery )
2. Kamera celowanie
Witam. Mianowicie mam problem z celowaniem w grze i w mta i w gta. Gdy celuje kamera schodzi mi sama w d??. Ni eiwem dlaczego robi?em reinstal i mta i gry ale nic to nie da?o pls powiedzcie jak to naprawi?. Ps mam podpi?te 2 myszki ale odponalem i zostawia?em 1 dalej tak by?o.
3. Celowanie w peda
Siemka g??wnie chodzi mi o to ?e gdy celujemy konkretnie w ped1 to na chacie wy?wietla si? powiadomienie, z funkcji onClientTargetPed. Aktualnie jest tak ?e gdy celujemy w byle jakiego peda powiadomienie si? wy?wietla. Wi?c mam pytanko jak okre?li? ped1 pr?bowa?em tak:

ped1 
createPed(0, -1504.82,744.69,7.19272)
function 
targetingActivated target )
    if ( 
target ) and (getElementType(target)=="ped") and isElement(ped1then
        outputChatBox
("celujesz w peda")
    
end
end
addEventHandler 
"onClientPlayerTarget"getRootElement(), targetingActivated )

oraz tak

ped1 
createPed(0, -1504.82,744.69,7.19272)
function 
targetingActivated target )
    if ( 
target ) and (getElementType(target)=="ped") and (ped1then
        outputChatBox
("celujesz w peda")
    
end
end
addEventHandler 
"onClientPlayerTarget"getRootElement(), targetingActivated )

kod

ped1 
createPed(0, -1504.82,744.69,7.19272)
function 
targetingActivated target )
    if ( 
target ) and (getElementType(target)=="ped"then
        outputChatBox
("celujesz w peda")
    
end
end
addEventHandler 
"onClientPlayerTarget"getRootElement(), targetingActivated )
4. Celowanie
Siema, jak nazywa si? funkcja kt?ra sprawdza czy celujemy w ped'a ?
5. Celowanie
Siema mam problem z celowaniem na serwerze, gdy kto? trzyma np.m4 to trzyma to tak jakby od do?u
Gdy celuj? to wygl?da to tak;
https://imgur.com/a/NVQWK9X
6. celowanie działem
Siema potrzebuj? pomocy z skryptem do czo?g?w, chcia?bym zrobi? tak aby to gracz ?rodkiem kamery wskazywa? miejsce w kt?re ma strzeli? czo?g ,ale w mta jest tak ?e dzia?o czo?gu kieruje si? w miejsce wskazane kamer? przez co miejsce w kt?re strzela gracz jest nad miejscem w kt?re on faktycznie wskazuje ,zobrazowa?em to ss`sami .

na ?? ?to jest to gdzie gracz wskazuje kamer? ,a na czerwono jest to gdzie czo?g faktycznie strzela .
https://imgur.com/a/40YVfNE
7. Celowanie suszarką nie działa
Mam gm ogrpg dok?adnie your adventure i mam problem z suszark? admina.
Doda?em sobie admina w bazie jak i acl po wpisaniu /duty suszarka mi sie pojawia ale za nic nie mog? ni? celowa? :( Og?lnie nie mog? celowa? ?adn? broni?...
Gdy jestem w aucie dzia?a celowanie i strzelanie z pistoletu.
Podczas wysiadania z auta gdy szybko klikne PPM to suszarka mi sie wlaczy ale tylko na chwile az wysiade ca?kowcie a auta :(

Pomo?e kto??
Jak co? to piszcie jaki plik mam zapoda? tylko dok?adnie bo ja trosz? zielonkawy jestem :)
Daj? piwerko za pomoc :)
8. Celowanie, suszarka
Witam, podczas u?ywania mojej suszarki (dzia?a znakomicie) niestety DB3 dostaje padaczki :( Kto? umia?by naprawi?? :piwo:

Wywala tak:
[spoiler][img]http://i.imgur.com/MF19Ng3.png[/img][/spoiler]

A tu kod z celowanie.lua:
[lua]function isPedAiming ( thePedToCheck )
if isElement(thePedToCheck) then
if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then
if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then
return true
end
end
end
return false
end


function checkInfo ()
if isPedAiming(source) then
local target = getPedTarget ( source )
local weapon = getPedWeapon ( source )
if getElementType(target) == "vehicle" and weapon == 22 then
local pojazd = getVehicleName(target)
local id = tonumber(getElementData(target, "car_id")) or "-"
local wlascicielP = getElementData(target, "car_owner") or "-"
local ostatniK = getElementData(target, "ostatni") or "-"
local sx, sy, sz = getElementVelocity ( target )
local speed = math.ceil( ( ( sx^2 + sy^2 + sz^2 ) ^ ( 0.5 ) ) * 161 )
setTimer(checkSpeed,255,0)
triggerEvent("otworzID", localPlayer, id, pojazd, wlascicielP, ostatniK, speed)
addEventHandler("onClientRender", root, drawStuff)
end
end
end
addEventHandler ( "onClientPlayerTarget", root, checkInfo )



function checkSpeed()
local t...
9. Celowanie
Witam mo?e zaczn? od tego ?e mam kod dzi?ki kt?remu przy u?yciu funkcji strza?u ma co? si? dzia? mianowicie chcia?bym aby celownik poszed? np o dwa centymetry do g?ry nie wiem jak? funkcj? lub sposobem to uzyska?,pomo?e kto??