Sziasztok. Az a kérdésem,hogy szerintetek ez a script korrekt e így (Én irtam)
Lehet hogy nem ide kell nyitni,de kezdő vagyok.
Itt a script.
Client
routes = { }
routes[1] = { 2430.5205078125, 1262.431640625, 9.443614006042 }
routes[2] = { 2429.6953125, 1460.9482421875, 9.420741081238 }
routes[3] = { 2419.92578125, 1664.232421875, 9.566228866577 }
routes[4] = { 2118.0400390625, 1776.337890625, 9.419044494629 }
routes[5] = { 2149.91015625, 2119.57421875, 9.418784141541 }
routes[6] = { 1939.5078125, 2116.16015625, 9.411161422729 }
routes[7] = { 2190.0830078125, 1356.025390625, 9.420398712158 }
routes[8] = { 1862.5185546875, 1274.9775390625, 9.418623924255 }
routes[9] = { 1735.6337890625, 1306.5048828125, 9.488379478455 }
routes[10] = { 1662.6455078125, 1715.7353515625, 9.424433708191 }
routes[11] = { 1570.5185546875, 1863.1220703125,9.423510551453 }
routes[12] = { 1151.1455078125, 1815.681640625, 10.409116744995 }
routes[13] = { 921.390625, 1855.4375, 9.420220375061 }
routes[14] = { 1009.529296875, 2138.138671875, 9.4192943573 }
routes[15] = { 1028.443359375, 2390.4072265625, 9.417165756226 }
local rendi = math.random(1,15)
local x, y, z = routes[rendi][1], routes[rendi][2], routes[rendi][3]
function cblip ()
setTimer(blip1,1000,1)
end
addEvent( \"cblip\", true )
addEventHandler( \"cblip\", localPlayer, cblip )
function blipdesi ()
destroyElement(blipp)
destroyElement(markk)
end
addEvent( \"blipdesi\", true )
addEventHandler( \"blipdesi\", localPlayer, blipdesi )
local rendi = math.random(1,15)
local x, y, z = routes[rendi][1], routes[rendi][2], routes[rendi][3]
function blip1 ()
blipp = createBlip(x, y, z, 32, 0, 0, 0, 255)
markk = createMarker(x, y, z,\"checkpoint\", 1.5, 255, 255, 0, 170)
addEventHandler(\"onClientMarkerHit\",markk,blip2)
end
local rendi = math.random(1,15)
local x, y, z = routes[rendi][1], routes[rendi][2], routes[rendi][3]
function blip55 ()
outputChatBox(\"Felmostad az utat!\")
givePlayerMoney(500)
destroyElement(blipp)
destroyElement(markk)
blipp = createBlip(x, y, z, 32, 0, 0, 0, 255)
markk = createMarker(x, y, z,\"checkpoint\", 1.5, 255, 255, 0, 170)
addEventHandler(\"onClientMarkerHit\",markk,blip2)
end
local rendi2 = math.random(1,10)
local x, y, z = routes[rendi2][1], routes[rendi2][2], routes[rendi2][3]
function blip2 ()
destroyElement(blipp)
destroyElement(markk)
blipp = createBlip(x, y, z, 32, 0, 0, 0, 255)
markk = createMarker(x, y, z,\"checkpoint\", 1.5, 255, 255, 0, 170)
addEventHandler(\"onClientMarkerHit\",markk,blip55)
givePlayerMoney(500)
end
function felmondaskor ()
if getElementData(localPlayer,\"job\") == 8 then
destroyElement(blipp)
destroyElement(markk)
else
outputChatBox(\"Nincs munkid\")
end
end
addCommandHandler(\"felmondas\",felmondaskor)
function onQuitGame( )
local vehicle = getPedOccupiedVehicle(getLocalPlayer())
destroyElement(blipp)
destroyElement(markk)
destroyElement(vehicle)
outputChatBox(\"ad\")
end
addEventHandler( \"onClientPlayerQuit\", getLocalPlayer(), onQuitGame )
Server
local pizzaVeh = 448
cars = {}
cars[1] = createVehicle(pizzaVeh,1671,-1893,13)
cars[2] = createVehicle(pizzaVeh,1669,-1893,13)
cars[3] = createVehicle(pizzaVeh,1662,-1893,13)
cars[4] = createVehicle(pizzaVeh,1658,-1893,13)
cars[5] = createVehicle(pizzaVeh,1652,-1893,13)
local random = math.random(1,5)
local rend = math.random(1,15)
setElementFrozen(cars[random],true)
function enterVehicle ( theVehicle, seat, jacked ) --when a player enters a vehicle
if getElementModel(theVehicle) == 448 then
if getElementData(source,\"job\") == 8 then
outputChatBox ( \"Only policeman can enter police cars!\", source ) -- and tell the player why
triggerClientEvent(\"cblip\",source,false)
end
end
end
addEventHandler ( \"onPlayerVehicleEnter\", getRootElement(), enterVehicle )
function exitVehicle ( theVehicle, seat, jacked ) --when a player enters a vehicle
if getElementModel(theVehicle) == 448 then
if getElementData(source,\"job\") == 8 then
outputChatBox ( \"Only policeman can enter police cars!\", source ) -- and tell the player why
triggerClientEvent(\"blipdesi\",source,false)
end
end
end
addEventHandler ( \"onPlayerVehicleExit\", getRootElement(), exitVehicle )
Mi a véleményetek? Találtok benne valami hibát,vagy van javaslatotok hogy hogyan lehetne feldobni?
A válaszokat előre is köszönöm!