NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
Witam mam problem z prac? po stronie serwera mianowicie pr?buje zrobi? prac? polegaj?c? na za?adowaniu dostawczka, po czym mo?emy wywie?? towar.
Z grupsza ow? prac? napisa?em lecz mam problem z outputchatboxem oraz funkcjami niekt?rymi, gdy? wykonuj? one si? ka?demu graczowi, kt?ry posiada rozpocz?t? prac?.
Kod:
-------------------------- WYWOZ KONOPII
local marker1 = {}
local marker2 = {}
local marker3 = {}
local marker4 = {}
local marker5 = {}
local marker6 = {}
local marker7 = {}
local marker8 = {}
local marker9 = {}
local marker10 = {}
local pojazd = {}
local marker_praca = {}
local blip_praca = {}
addEvent ( "RozpocznijWywoz" , true )
addEventHandler ( "RozpocznijWywoz" , root ,function()
--[[ if getElementData ( source , "rozpoczeta" ) == true then return end
if getElementData ( source , "oddaj" ) == true then return end
if getElementData ( source , "nadruga" ) == true then return end
if getElementData ( source , "natrzecia" ) == true then return end
if getElementData ( source , "oddajdwa" ) == true then return end
if getElementData ( source , "oddajtrzy" ) == true then return end
if getElementData ( source , "oddalall" ) == true then return end
if getElementData ( source , "dojazdlegalna" ) == true then return end
if getElementData ( source , "dojazdnielegalna" ) == true then return end
]]--
setElementData ( source , "rozpoczeta" , true )
setElementData ( source , "StartKonopieWywuz" , true )
local iloscTopow = getElementData ( source , "Topy" )
outputChatBox ( "#ffffffRozpocze?e? wyw?? #3388ff" .. iloscTopow .. "#ffffff top?w, udaj si? do magazynu po topy. Nast?pnie za?aduj je do burrito." , source , 255 , 255 , 255 , true )
marker1 [ source ] = createMarker (- 3380.11 , 58.35 , 1.30 - 0.96 , "cylinder" , 1.2 , 0 , 209 , 255 , 0 )
setElementData ( marker1 [ source ], "custom_marker" , true )
setElementData ( source , "oddaj" , false )
setElementData ( source , "nadruga" , false )
setElementData ( source , "natrzecia" , false )
setElementData ( source , "oddajdwa" , false )
setElementData ( source , "oddajtrzy" , false )
setElementData ( source , "oddalall" , false )
setElementData ( source , "dojazdlegalna" , false )
setElementData ( source , "dojazdnielegalna" , false )
setElementData ( source , "pracuje:KONOPIE" , false )
addEventHandler ( "onMarkerHit" , marker1 [ source ], kopanie )
end )
function kopanie ( el , md )
if getElementData ( el , "rozpoczeta" ) == true then
outputChatBox ( "#ffffffBierzesz paczk? ..." , el , 255 , 255 , 255 , true )
triggerClientEvent ( el , "AnimacjaStart" , el )
setElementFrozen ( el , true )
setTimer ( function ()
outputChatBox ( "#ffffffWzie?es #3388ff1 #ffffffz #3388ff3 #ffffffpaczek " , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffUdaj si? do Burrito#ffffff, aby zapakowa? topy na pake!" , el , 255 , 255 , 255 , true )
setPedAnimation ( el , false )
setElementData ( el , "oddaj" , true )
setElementData ( el , "rozpoczeta" , false )
setElementFrozen ( el , false )
setPedAnimation ( el , false )
destroyElement ( marker1 [ el ])
marker2 [ el ] = createMarker (- 3381.45 , 62.42 , 1.30 - 0.96 , "cylinder" , 1.2 , 0 , 209 , 255 , 0 )
setElementData ( marker2 [ el ], "custom_marker" , true )
addEventHandler ( "onMarkerHit" , marker2 [ el ], zaladowanie )
end , 7000 , 1 )
end
end
function zaladowanie ( el , md )
if getElementData ( el , "oddaj" ) == true then
outputChatBox ( "#ffffffOddajesz paczke ..." , el , 255 , 255 , 255 , true )
setPedAnimation ( el , "WASH" , "wash_up" )
setElementFrozen ( el , true )
setTimer ( function ()
outputChatBox ( "#ffffffOdda?es #3388ff1#ffffff paczk?, udaj si? aby przyniesc nast?pn?!" , el , 255 , 255 , 255 , true )
setElementFrozen ( el , false )
setElementData ( el , "oddaj" , false )
setElementData ( el , "nadruga" , true )
destroyElement ( marker2 [ el ])
marker3 [ el ] = createMarker (- 3380.11 , 58.35 , 1.30 - 0.96 , "cylinder" , 1.2 , 0 , 209 , 255 , 0 )
setElementData ( marker3 [ el ], "custom_marker" , true )
addEventHandler ( "onMarkerHit" , marker3 [ el ], KopanieDwa )
end , 7000 , 1 )
end
end
function KopanieDwa ( el , md )
if getElementData ( el , "nadruga" ) == true then
outputChatBox ( "#ffffffBierzesz paczk? ..." , el , 255 , 255 , 255 , true )
setElementFrozen ( el , true )
setTimer ( function ()
outputChatBox ( "#ffffffWzie?es #3388ff2 #ffffffz #3388ff3 #ffffffpaczek " , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffUdaj si? do Burrito#ffffff, aby zapakowa? topy na pake!" , el , 255 , 255 , 255 , true )
setElementData ( el , "nadruga" , false )
setElementData ( el , "oddajdwa" , true )
setPedAnimation ( el , false )
setElementFrozen ( el , false )
destroyElement ( marker3 [ el ])
marker4 [ el ] = createMarker (- 3381.45 , 62.42 , 1.30 - 0.96 , "cylinder" , 1.2 , 0 , 209 , 255 , 0 )
setElementData ( marker4 [ el ], "custom_marker" , true )
addEventHandler ( "onMarkerHit" , marker4 [ el ], zaladowanieDwa )
end , 7000 , 1 )
end
end
function zaladowanieDwa ( el , md )
if getElementData ( el , "oddajdwa" ) == true then
outputChatBox ( "#ffffffOddajesz paczk? ..." , el , 255 , 255 , 255 , true )
setPedAnimation ( el , "WASH" , "wash_up" )
setElementFrozen ( el , true )
setTimer ( function ()
outputChatBox ( "#ffffffOdda?es #3388ff1#ffffff paczk?, udaj si? aby przyniesc nast?pn?!" , el , 255 , 255 , 255 , true )
setElementFrozen ( el , false )
setElementData ( el , "oddajdwa" , false )
setElementData ( el , "natrzecia" , true )
destroyElement ( marker4 [ el ])
marker5 [ el ] = createMarker (- 3380.11 , 58.35 , 1.30 - 0.96 , "cylinder" , 1.2 , 0 , 209 , 255 , 0 )
setElementData ( marker5 [ el ], "custom_marker" , true )
addEventHandler ( "onMarkerHit" , marker5 [ el ], kopanieTrzy )
end , 7000 , 1 )
end
end
function kopanieTrzy ( el , md )
if getElementData ( el , "natrzecia" ) == true then
outputChatBox ( "#ffffffBierzesz paczk? ..." , el , 255 , 255 , 255 , true )
setElementFrozen ( el , true )
setTimer ( function ()
outputChatBox ( "#ffffffWzie?es #3388ff3 #ffffffz #3388ff3 #ffffffpaczek " , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffUdaj si? do Burrito#ffffff, aby zapakowa? topy na pake!" , el , 255 , 255 , 255 , true )
setElementData ( el , "natrzecia" , false )
setElementData ( el , "oddajtrzy" , true )
setPedAnimation ( el , false )
setElementFrozen ( el , false )
destroyElement ( marker5 [ el ])
marker6 [ el ] = createMarker (- 3381.45 , 62.42 , 1.30 - 0.96 , "cylinder" , 1.2 , 0 , 209 , 255 , 0 )
setElementData ( marker6 [ el ], "custom_marker" , true )
addEventHandler ( "onMarkerHit" , marker6 [ el ], zaladowanieTrzy )
end , 7000 , 1 )
end
end
function zaladowanieTrzy ( el , md )
if getElementData ( el , "oddajtrzy" ) == true then
outputChatBox ( "#ffffffOddajesz paczk? ..." , el , 255 , 255 , 255 , true )
setPedAnimation ( el , "WASH" , "wash_up" )
setElementFrozen ( el , true )
setTimer ( function ()
outputChatBox ( "#ffffffWybierz rodzaj przewozu:" , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffAby rozwie?? marihuane w spos?b ostro?ny wpisz #3388ff/opodatkowana " , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffAby rozwie?? marihuane w spos?b nieostro?ny wpisz #3388ff/nieopodatkowany" , el , 255 , 255 , 255 , true )
setElementData ( el , "oddajtrzy" , false )
setElementData ( el , "oddalall" , true )
setElementFrozen ( el , false )
destroyElement ( marker6 [ el ])
end , 7000 , 1 )
end
end
function opodatkowana ( el , md )
if getElementData ( el , "oddalall" ) == true then
pojazd [ el ] = createVehicle ( 482 , 981.98 , - 1433.44 , 13.67 , 359.3 , 0.3 , 181.0 )
warpPedIntoVehicle ( el , pojazd [ el ])
setVehiclePlateText ( pojazd [ el ], "Legalna" )
setVehicleColor ( pojazd [ el ], 255 , 255 , 255 )
addVehicleUpgrade ( pojazd [ el ], 1025 )
setElementData ( el , "oddalall" , false )
setElementData ( el , "KonczyPrace" , true )
setElementData ( pojazd [ el ], "PojazdKONOPIE" , true )
setElementData ( el , "dojazdlegalna" , true )
outputChatBox ( "#ffffffRozpocze?e? wyw?z Marihuany " , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffRodzaj wywozu: #3388ffopodatkowany" , el , 255 , 255 , 255 , true )
marker_praca [ el ] = createMarker (- 2107.51 , - 2401.92 , 31.38 - 0.96 , "cylinder" , 3.2 , 0 , 209 , 255 , 0 )
setElementData ( marker_praca [ el ], "custom_marker" , true )
blip_praca [ el ] = createBlipAttachedTo ( marker_praca [ el ], 41 )
addEventHandler ( "onMarkerHit" , marker_praca [ el ], OpodatkowanyMarkerRozladunek )
end
end
addCommandHandler ( "opodatkowana" , opodatkowana )
function nieopodatkowany ( el , md )
if getElementData ( el , "oddalall" ) == true then
pojazd [ el ] = createVehicle ( 482 , 981.98 , - 1433.44 , 13.67 , 359.3 , 0.3 , 181.0 )
warpPedIntoVehicle ( el , pojazd [ el ])
setVehiclePlateText ( pojazd [ el ], "nieostrozny" )
setVehicleColor ( pojazd [ el ], 0 , 0 , 0 , 255 , 255 , 255 )
addVehicleUpgrade ( pojazd [ el ], 1025 )
setElementData ( el , "oddalall" , false )
setElementData ( pojazd [ el ], "PojazdKONOPIE" , true )
setElementData ( el , "dojazdnielegalna" , true )
setElementData ( el , "KonczyPrace" , true )
outputChatBox ( "#ffffffRozpocze?e? wyw?z Marihuany " , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffRodzaj wywozu: #3388ffnieopodatkowany" , el , 255 , 255 , 255 , true )
marker_praca [ el ] = createMarker (- 1819.27 , - 149.82 , 9.40 - 0.96 , "cylinder" , 3.2 , 0 , 209 , 255 , 0 )
setElementData ( marker_praca [ el ], "custom_marker" , true )
blip_praca [ el ] = createBlipAttachedTo ( marker_praca [ el ], 41 )
addEventHandler ( "onMarkerHit" , marker_praca [ el ], NieOpodatkowanyMarkerRozladunek )
end
end
addCommandHandler ( "nieopodatkowany" , nieopodatkowany )
function OpodatkowanyMarkerRozladunek ( el , md )
if getElementData ( el , "dojazdlegalna" ) == true then
destroyElement ( pojazd [ el ])
destroyElement ( marker_praca [ el ])
destroyElement ( blip_praca [ el ])
outputChatBox ( "#ffffffTrwa roz?adowywanie zasobow ..." , el , 255 , 255 , 255 , true )
setElementFrozen ( el , true )
local iloscTopow = getElementData ( el , "Topy" )
setTimer ( function ()
local HajsOpodatkowany = iloscTopow * 60
outputChatBox ( "#ffffffZa wykonan? prac? otrzymujesz #3388ff" .. HajsOpodatkowany .. " #ffffffPLN." , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffIlo?? wywiezionych top?w: #3388ff" .. iloscTopow .. " #ffffff." , el , 255 , 255 , 255 , true )
setElementData ( el , "pieniadze" , getElementData ( el , "pieniadze" )+ HajsOpodatkowany )
setElementData ( el , "Topy" , 0 )
setElementData ( el , "punkty" , getElementData ( el , "punkty" )+ 30 )
setElementPosition ( el , 1004.94 , - 1437.21 , 13.55 )
setElementData ( el , "dojazdlegalna" , false )
setElementFrozen ( el , false )
setElementData ( el , "rozpoczeta" , false )
setElementData ( el , "StartKonopieWywuz" , false )
end , 1000 , 1 )
end
end
function NieOpodatkowanyMarkerRozladunek ( el , md )
if getElementData ( el , "dojazdnielegalna" ) == true then
destroyElement ( pojazd [ el ])
destroyElement ( marker_praca [ el ])
destroyElement ( blip_praca [ el ])
outputChatBox ( "#ffffffTrwa roz?adowywanie zasobow ..." , el , 255 , 255 , 255 , true )
setElementFrozen ( el , true )
local iloscTopow = getElementData ( el , "Topy" )
setTimer ( function ()
local HajsNieOpodatkowany = iloscTopow * 120
outputChatBox ( "#ffffffZa wykonan? prac? otrzymujesz #3388ff" .. HajsNieOpodatkowany .. " #ffffffPLN." , el , 255 , 255 , 255 , true )
outputChatBox ( "#ffffffIlo?? wywiezionych top?w: #3388ff" .. iloscTopow .. " #ffffff." , el , 255 , 255 , 255 , true )
setElementData ( el , "pieniadze" , getElementData ( el , "pieniadze" )+ HajsNieOpodatkowany )
setElementData ( el , "Topy" , 0 )
setElementData ( el , "punkty" , getElementData ( el , "punkty" )+ 30 )
setElementPosition ( el , 1004.94 , - 1437.21 , 13.55 )
setElementData ( el , "dojazdnielegalna" , false )
setElementFrozen ( el , false )
setElementData ( el , "rozpoczeta" , false )
setElementData ( el , "StartKonopieWywuz" , false )
end , 1000 , 1 )
end
end
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak