Ponki2x2
Wiek: 36 Na forum: 4639 dni Posty: 19
Witam Pobra?em Z Neta Skrypt NA Pojazdy Firmowe ACL Ale Nie Dzia?a Da?em Po Stronie Servera :
Kod: Meta.xml
<meta>
<info author="MaciPorek" version="1.0" type="FrakcjeCar" name="car-frakcje"/>
<script src="pdcar.lua" type="server"></script>
<script src="policar.lua" type="server"></script>
<script src="taxicar.lua" type="server"></script>
<script src="urzadcar.lua" type="server"></script>
</meta>
Kod: urzadcar.lua
pojazdy = { [488]=true, [582]=true, [600]=true }
nazwa_grupy_acl = "Urzad"
addEventHandler("onVehicleStartEnter", root,
function (player, seat)
if seat == 0 then --je?eli gracz pr?buje wej?? na siedzenie keirowcy
if pojazdy[getElementModel(source)] then --je?eli model pojazdu jest w tabeli pojazdy
if not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup(nazwa_grupy_acl))) then --je?eli dany gracz NIE jest adminem
cancelEvent() --blokuje wej?cie
outputChatBox("Nie jeste? Urzednikiem.", player, 255, 0, 0, true)
end
end
end
end
)
Kod: taxicar.lua
pojazdy = { [438]=true, [420]=true }
nazwa_grupy_acl = "Taxi"
addEventHandler("onVehicleStartEnter", root,
function (player, seat)
if seat == 0 then --je?eli gracz pr?buje wej?? na siedzenie keirowcy
if pojazdy[getElementModel(source)] then --je?eli model pojazdu jest w tabeli pojazdy
if not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup(nazwa_grupy_acl))) then --je?eli dany gracz NIE jest adminem
cancelEvent() --blokuje wej?cie
outputChatBox("Nie jeste? z Taxi.", player, 255, 0, 0, true)
end
end
end
end
)
Kod: pdcar.lua
pojazdy = { [563]=true, [443]=true, [486]=true, [406]=true, [530]=true, [525]=true, [574]=true, [583]=true }
nazwa_grupy_acl = "PomocDrogowa"
addEventHandler("onVehicleStartEnter", root,
function (player, seat)
if seat == 0 then --je?eli gracz pr?buje wej?? na siedzenie keirowcy
if pojazdy[getElementModel(source)] then --je?eli model pojazdu jest w tabeli pojazdy
if not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup(nazwa_grupy_acl))) then --je?eli dany gracz NIE jest adminem
cancelEvent() --blokuje wej?cie
outputChatBox("Nie jeste? z PD.", player, 255, 0, 0, true)
end
end
end
end
)
Kod:
policar.lua
pojazdy = { [497]=true, [523]=true, [427]=true, [490]=true, [596]=true, [598]=true, [597]=true, [599]=true, [601]=true, [430]=true }
nazwa_grupy_acl = "Policja"
addEventHandler("onVehicleStartEnter", root,
function (player, seat)
if seat == 0 then --je?eli gracz pr?buje wej?? na siedzenie keirowcy
if pojazdy[getElementModel(source)] then --je?eli model pojazdu jest w tabeli pojazdy
if not (isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup(nazwa_grupy_acl))) then --je?eli dany gracz NIE jest adminem
cancelEvent() --blokuje wej?cie
outputChatBox("Nie jeste? Policjantem.", player, 255, 0, 0, true)
end
end
end
end
)
Prosze O Wyt?umaczenie Jestem Nowy W Skryptach[/code]