Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-12-31, 10:01


michal982010







Wiek: 29
Na forum: 4445 dni
Posty: 69

Piwa: 1

Respekt: 50

Witam pom?g? by mi kto? doda? tewn skrypt do grupy acl Admin ?
z g?ry dzi?kuje za pomoc. :)
za ka?d? pomoc daje :piwo:

Kod:

function SpawnBob(thePlayer)
local x, y, z = getElementPosition(thePlayer)
veh = createVehicle(568, x + 5, y, z)
vehCol = createColSphere(x + 5, y, z, 2)
attachElements(vehCol, veh, 0, 0, 0)
setElementData(vehCol, "parent", veh)
setElementData(veh, "parent", vehCol)
setElementData(vehCol, "vehicle", true)
setElementData(vehCol, "MAX_Slots", 20)
local tires, engine, parts = getVehicleAddonInfos(getElementModel(veh))
setElementData(vehCol, "Tire_inVehicle", math.random(0,4))
setElementData(vehCol, "Engine_inVehicle", math.random(0,1))
setElementData(vehCol, "Parts_inVehicle", math.random(0,1))
setElementData(vehCol, "spawn", {
568,
x,
y,
z
})
setElementData(vehCol, "fuel", 80)
end
addCommandHandler("spawnbandito", SpawnBob)
vehicleAddonsInfo = {
{
568,
4,
1,
1
}
}
function getVehicleAddonInfos(id)
for i, veh in ipairs(vehicleAddonsInfo) do
if veh[1] == id then
return veh[2], veh[3], veh[4]
end
end
end
vehicleFuelInfo = {
{568, 0.25}
}
function getVehicleAddonInfos(id)
for i, veh in ipairs(vehicleAddonsInfo) do
if veh[1] == id then
return veh[2], veh[3], veh[4]
end
end
end
vehicleFuelTable = {
{568, 80}
}
function getVehicleMaxFuel(loot)
local modelID = getElementModel(getElementData(loot, "parent"))
for i, vehicle in ipairs(vehicleFuelTable) do
if modelID == vehicle[1] then
return vehicle[2]
end
end
return false
end
function onPlayerEnterdayZVehBobicle(veh, seat)
local col = getElementData(VehBob, "parent")
local id = getElementModel(VehBob)
if not seat == 1 then
return
end
local tires, engine, parts = getVehicleAddonInfos(id)
setVehicleEngineState(VehBob, false)
setElementData(VehBob, "maxfuel", getVehicleMaxFuel(col))
setElementData(VehBob, "needtires", tires)
setElementData(VehBob, "needengines", engine)
setElementData(VehBob, "needparts", parts)
if getElementData(col, "Tire_inVehicle") or 0 < tonumber(tires) then
setVehicleEngineState(VehBob, false)
return
end
if getElementData(col, "Engine_inVehicle") or 0 < tonumber(engine) then
setVehicleEngineState(VehBob, false)
return
end
if not getElementData(col, "Parts_inVehicle") then
setElementData(col, "Parts_inVehicle", math.random(0, parts))
end
if getElementData(col, "fuel") or 1 >= 0 and not getElementModel(VehBob) == 509 then
triggerClientEvent(source, "displayClientInfo", source, "Vehicle", "No tank left in this vehicle!", 22, 255, 0)
setVehicleEngineState(VehBob, false)
return
end
end
[/code][/quote]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 10:21


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Kliknij P na serwerze > Resources > Manage ACL > Kliknij 2x Admin > Add Object > "resource.*"

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 15:53


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

Idiotyzmem jest dodawanie wszystkich skrypt?w (resource.*) do grupy Admin.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 16:09


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

dudeks, je?li nie ?ci?gasz skrypt?w z neta to wybacz, mam nie ufa? swoim skryptom?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 17:15


markob0







Wiek: 27
Na forum: 4248 dni
Posty: 151
Nick w MP: Markob

Piwa: 939

Respekt: 98,2

Podam jeszcze drugi spos?b. Otwierasz acl.xml kt?ry masz w swoim FTP. I w kategorii Admin dodajesz linijk? z <object ...>resource.nazwaskryptu</object> i tyle :)

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 18:23


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

"Shuffle" napisał/a:

dudeks, je?li nie ?ci?gasz skrypt?w z neta to wybacz, mam nie ufa? swoim skryptom?


Zacznijmy od tego, ?e to nie jest jego skrypt.
I nie wszystkie skrypty potrzebuj? uprawnienia admina, to po co je dodawa??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 19:12


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

dudeks, ale ja tu gwiazdk? nie oznaczy?em wszystkich skrypt?w, tylko miejsce do wpisania nazwy, wi?c ?

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-31, 19:58


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

Mo?liwe, ale gwiazdka dodaje wszystkie skrypty, tak samo jak user.* wszystkich u?ytkownik?w.

Postaw piwo autorowi tego posta
 

 
Tagi: skrypt :: acl
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » skrypt do ACL Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku