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: warpplayerintovehicle
1. warpPlayerIntoVehicle
Siemanko chcia?em dorobi? do serwera przydatn? dla mnie komend?, wszystko pi?knie tylko ?e gracza nie teleportuje do pojazdu :P

addCommandHandler("respawnauta",function(plr,cmd,id,ccar)
   if 
getAdmin(plr,4) then
   local veh 
= getPedOccupiedVehicle(plr)
   if 
not id or not tonumber(id) then
        outputChatBox
("MS♛ •  Podaj id pojazdu!", plr, 255, 0, 0)
        return
    
end
    
if not veh then
       outputChatBox
("MS♛ •  Musisz by? w pojed?dzie.", plr, 255,0,0)
       return
    
end
    local id 
= getElementData(veh, "vehicle:id")
    
local x,y,z=getElementPosition(veh)
    
local rx,ry,rz=getElementRotation(veh)
    
local aktualna_pozycja={x,y,z,rx,ry,rz}
    
exports["pystories-vehicles"]:onSaveVehicle(veh)
    
destroyElement(veh)
    
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1,tp_to_parking=? WHERE id=?","Respawn RCON", id)
    
setTimer(function(gracz, id, aktualna_pozycja)
        
local x = exports["pystories-vehicles"]:onRespawnVehicles(_,tonumber(id), aktualna_pozycja)
        
warpPlayerIntoVehicle ( plr, x )
    
end, 50, 1, client, id, aktualna_pozycja)
    
end
end
)