Wysłany: 2015-03-31, 16:01
pawel998
Wiek: 35 Na forum: 4261 dni Posty: 29
Nick w MP: Piotrek101
Kod: pdVehicles = { [563]=true,[416]=true,[552]=true,[407]=true,[580]=true }
function enterVehicle ( player, seat, jacked )
if ( pdVehicles[getElementModel(source)] ) and ( not
outputChatBox ( "Nie jestes Strazakiem! Nie posiadasz uprawnien do kierowania tym pojazdem!", player )
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )
Mam Taki kod ale chcem to pod acl jak to zrobi? daje
Ostatnio zmieniony przez pawel998 2015-03-31, 18:55, w całości zmieniany 1 raz
Wysłany: 2015-03-31, 16:05
Loop
Inspektor
Wiek: 27 Na forum: 4289 dni Posty: 311
Nick w MP: Inspektor
Piwa : 201
to lepiej zrobic na element date
Wysłany: 2015-03-31, 22:07
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
Daj? ci poprawny kod my?l? ?e zadzia?a a jak tak to licz? na
policeVehicles = { [ 598 ]= true ,[ 596 ]= true ,[ 597 ]= true ,[ 432 ]= true ,[ 433 ]= true ,[ 528 ]= true ,[ 490 ]= true ,[ 599 ]= true }
policeSkins = { [ 280 ]= true ,[ 281 ]= true ,[ 282 ]= true ,[ 283 ]= true ,[ 284 ]= true ,[ 285 ]= true ,[ 286 ]= true }
function enterVehicle ( player , seat , jacked )
if seat == 0 then
if ( policeVehicles [ getElementModel ( source )] ) and ( not policeSkins [ getElementModel ( player )] ) then
cancelEvent ()
outputChatBox ( "Nie jestes pracownikiem Policji !" , player )
end
end
end
addEventHandler ( "onVehicleStartEnter" , getRootElement (), enterVehicle )
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2015-04-01, 16:38
TheTroll
Pan Majster
Wiek: 38 Na forum: 4764 dni Posty: 219
Nick w MP: TheTroll
Piwa : 1114
Masz tutaj gotowy kod po stronie serwera
pdVehicles = {[ 563 ]= true ,[ 416 ]= true ,[ 552 ]= true ,[ 407 ]= true ,[ 580 ]= true }
grupa = "Grupa ACL" -- Wpisz tam nazwe grupy ACL
addEventHandler ( "onVehicleStartEnter" , getRootElement (),
function( player , seat , jacked )
if pdVehicles [ getElementModel ( source )] and not isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player )), aclGetGroup ( grupa )) then
cancelEvent ()
outputChatBox ( "Nie jestes Strazakiem! Nie posiadasz uprawnien do kierowania tym pojazdem!" , player )
end
end )
Wysłany: 2015-04-01, 16:41
pawel998
Wiek: 35 Na forum: 4261 dni Posty: 29
Nick w MP: Piotrek101
Nie dostaniesz Piwa bo nie chcem na skin ?e musisz mie? by wsi??? tylko na ACL
[ Dodano : 2015-04-01, 16:42 ]
The Troll Dzi?ki sprawdze czy dzia?a xD
Wysłany: 2015-04-02, 17:04
Pumelowsky
Amator 3D
Wiek: 23 Na forum: 4182 dni Posty: 199
Nick w MP: Pumelowsky
Piwa : 1666
ja ci dam taki mialem go na psp ale przerobilem na policje
function onEnter ( player , seat , jacker )
if seat == 0 then
local datauato = getElementData ( source , "Policja" )
if datauato == true then
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "Policja" )) then
else
outputChatBox ( player , "Ten pojazd nale?y do Policji. Nie mo?esz prowadzi? tego pojazdu!" )
cancelEvent ()
end
end
end
end
addEventHandler ( "onVehicleStartEnter" , getRootElement (), onEnter )
function onEnter2 ( player , seat , jacker )
if seat == 0 then
local id = getElementModel ( source )
if id == 416 or id == 563 or id == 552 or id == 407 or id == 580 then
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( player )), aclGetGroup ( "Policja" )) then
else
outputChatBox ( player , "Ten pojazd nale?y do Policji. Nie mo?esz prowadzi? tego pojazdu!" )
cancelEvent ()
end
end
end
end
addEventHandler ( "onVehicleStartEnter" , getRootElement (), onEnter2 )
Podpis
Kontakt:
- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Tagi: auta :: frakcji
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: