Witam od wczoraj robie prawo jazdy i mam narazie takie cos
server:
[lua]
function prawojazdy (source,seat,jacked)
local accName = getAccountName ( getPlayerAccount ( source ) ) -- get his account name
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Prawko" ) ) then
else
if seat == 0 then
outputChatBox ( "Nie posiadasz prawa jazdy lub zosta?o ono cofni?te!", source, 255, 255, 255)
cancelEvent ()
end
end
end
addEventHandler('onVehicleStartEnter',root,prawojazdy)
addEvent('guiokno',true)
local rozpocznij = createMarker(361.83,173.62,1007.38,"cylinder",1.5,0,0,100,100)
setElementInterior(rozpocznij,3)
setElementDimension(rozpocznij,1)
addEventHandler('onMarkerHit',root,function(player)
if isElementWithinMarker(player,rozpocznij) then
triggerClientEvent(player,"pokazgui",root)
showCursor(player,true)
end
end)
function rozpocznijkurs (source)
local mesa = createVehicle(500,1668.89,-1693.82,20.58,358.8,0.1,176.1)
setElementData(mesa,"pojazd_opis","Egzamin prawa jazdynLos Santos")
setElementData(mesa,"pojazd_paliwo",100)
setVehicleHandling(mesa,"maxVelocity",80)
warpPlayerIntoVehicle(source,mesa)
setElementInterior(source,0)
setElementDimension(source,0)
triggerClientEvent(source,"showmarker",root)
--toggleControl(source, "enter_exit", false)
end
addEventHandler('guiokno',root,rozpocznijkurs)
[/lua]...