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: koordów
1. Pobieranie koordów ziemi z celowania
Cze?? i czo?em! Przychodz? z problemem, ju? t?umacz? o co chodzi.
Chc? sobie zrobi? funkcje kt?ra wysy?a?aby obiekt ode mnie tam gdzie celuj?.

U?y?em getWorldFromScreenPosition ale g?owi? si? od godziny i nie moge wymy?li? jak to zrobi?... Narazie stworzy?em co? takiego;



function Paczka(weaponammoammoInCliphitXhitYhitZhitElement)
if (
getElementData(localPlayer,"TEST")==truethen
    
if (weapon==35then
        
if isPedAiming(localPlayerthen
            local x
,y,getElementPosition(localPlayer)
            
local wguiGetScreenSize ()
            
local x2,y2,z2 getWorldFromScreenPosition w/2h/2,10,10)
            
local obiekt createObject(964,x,y,z+1)
            
moveObject(obiekt,500,x2,y2,z2)
        else
        
end
    
else
    
end
else
end
end
addEventHandler
("onClientPlayerWeaponFire",root,Paczka)

function 
isPedAiming thePedToCheck )
    if 
isElement(thePedToCheckthen
        
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



Prosz? o pomoc :mrgreen: