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: ttv
1. Lua + MySQL ttv
Witam

Chcia?bym ?eby kto? mi pom?g? z pobraniem z bazy danych, ju? mam tak? zamu?e ?e nie mog? wykombinowa? a to jedna linijka probably


Tu skrypty na ttv, ttp i vehowner
[code]function ttv(plr,cmd,id)
local account = getPlayerAccount(plr)
local name = getAccountName(account)
if not isObjectInACLGroup("user."..name, aclGetGroup("Admin")) then return end
if id then
local id = tonumber(id)
local v = znajdzpojazd(id)
if v then
warpPedIntoVehicle(plr,v)
outputChatBox("Teleportowano do pojazdu o ID: "..id,plr,255,0,0,true)
else
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0,true)
end
else
outputChatBox("Nie wpisa?e? ID pojazdu.",plr,255,0,0,true)
end
end
addCommandHandler("ttv",ttv)

function ttp(plr,cmd,id)
local account = getPlayerAccount(plr)
local name = getAccountName(account)
if not isObjectInACLGroup("user."..name, aclGetGroup("Admin")) then return end
if id then
local id = tonumber(id)
local v = znajdzpojazd(id)
if v then
local x,y,z = getElementPosition(plr)
setElementPosition(v,x,y,z)
setElementPosition(plr,x,y,z+3)
outputChatBox("Teleportowano pojazd o ID: "..id,plr,255,0,0,true)
else
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0,true)
end
else
outputChatBox("Nie wpisa?e? ID pojazdu.",plr,255,0,0,true)
end
end
addCommandHandl...
2. ttv
Kod:

addCommandHandler("ttv", function(player,command,vid)
local login = getAccountName ( getPlayerAccount ( vid ) )
if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(login) then
for i,v in ipairs(getElementsByType("vehicle")) do
if getElementData(v, "car_id") == tonumber(vid) then
setElementAlpha(player,0)
local x,y,z=getElementPosition(v)
setElementPosition(player,x,y,z+4)
setElementInterior(player, getElementInterior(v))
setElementDimension(player, getElementDimension(v))
return
end
end
end
outputChatBox("Nie odnaleziono na mapie pojazdu o podanym ID.", plr, 255,0,0)
end)


po wpisaniu komendy i id pojazdu pisze "Nie odnaleziono na mapie pojazdu o podanym ID." i nie moge tego naprawi? :(
3. ttv i ttp
Witam mam skrypt z GTAONLINE vehiclecomand czy jako? tak gdy mia?em ten skrypt na suchym jeszcze nei wykupionym sewerze wszystko dzia?a?o ale problem zacz?? si? wtedy gdy wykupi?em serwer wgra? skrypt wpisuje ttv lub ttp i nic nie dzia?a dam wam ca?y skrypt
PS:Za pomoc stawiam zimne :piwo:

[lua]
--[[
Author: AteX<[email protected]>
]]--

function ttv(plr,cmd,id)
local account = getPlayerAccount(plr)
local name = getAccountName(account)
if not isObjectInACLGroup("user."..name, aclGetGroup("Moderator")) then return end
if id then
local id = tonumber(id)
local v = znajdzpojazd(id)
if v then
warpPedIntoVehicle(plr,v)
outputChatBox("Teleportowano do pojazdu o ID: "..id,plr,255,0,0,true)
else
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0,true)
end
else
outputChatBox("Nie wpisa?e? ID pojazdu.",plr,255,0,0,true)
end
end
addCommandHandler("ttv",ttv)

function ttp(plr,cmd,id)
local account = getPlayerAccount(plr)
local name = getAccountName(account)
if not isObjectInACLGroup("user."..name, aclGetGroup("Moderator")) then return end
if id then
local id = tonumber(id)
local v = znajdzpojazd(id)
if v then
local x,y,z = getElementPosition(plr)
setElementPosition(v,x,y,z)
setElementPosition(plr,x,y,z+3)
outputChatBox("Teleportowano pojazd o ID: "..id,plr,255,0,0,true)
else
...
4. teleportowanie do auta ttv
Nie dzia?a , pomocy.

function ttv plr,cmd,id )
    
local login getAccountName getPlayerAccount plr ) )
    if 
sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(loginthen
    
if id then
        local id 
tonumber(id)
        
local v znajdzpojazd(id)
        if 
v then
            warpPedIntoVehicle
(plr,v)
            
outputChatBox("Teleportowano do pojazdu o ID: "..id,plr,255,0,0,true)
        else
            
outputChatBox("Nie znaleziono pojazdu o takim ID.",plr,255,0,0,true)
        
end
    
else
        
outputChatBox("Nie wpisa?e? ID pojazdu.",plr,255,0,0,true)
    
end
end
addCommandHandler
("ttv",ttv)

function 
znajdzpojazd(id)
    for 
i,v in pairs(getElementsByType("vehicle")) do
        if 
getElementData(v,"car_id") == id then
            
return v
        end
    end
end