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: admina!
1. Skrypt tylko dla admina!
Witam, chcia?bym aby poni?szy skrypt sprawdza? czy dany gracz jest w grupie acl np. "Admin"


Kod:

addCommandHandler
("sp", function(gracz, cmd, auto)
    
local model = getVehicleModelFromName(auto)
    
local x, y, z = getElementPosition(gracz)
    
local rx, ry, rz = getElementRotation(gracz)
    
local dimension = getElementDimension(gracz)
    
local interior = getElementInterior(gracz)
    if 
not model then
        outputChatBox
("Wpisz: /sp <model pojazdu> Przyk?ad: /sp bullet", gracz, 255, 255, 255, true)
    else
        
local pojazd = createVehicle(model, x, y, z, rx, ry, rz)
        
setElementDimension(pojazd, dimension)
        
setElementInterior(pojazd, interior)
        
setElementData(pojazd, "KtoZrespilAuto", getPlayerName(gracz))
        
setVehiclePlateText(pojazd, "EasyLifeRPG")
        
warpPedIntoVehicle(gracz, pojazd)
    
end
end
)

addCommandHandler("spu", function(gracz)
    for 
i, v in ipairs(getElementsByType("vehicle")) do
        if 
getElementData(v, "KtoZrespilAuto") == getPlayerName(gracz) then
            destroyElement
(v)
        
end
    end
end
)