Wysłany: 2016-01-17, 18:51
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Mam taki kod, wszystko ?adnie pi?knie, ale po wej?ciu w marker pokazuje, ?e nie ma pojazdu na stanowsku :X
s_side
--[[
@ author Lukasz Biegaj < wielebny @ bestplay . pl >
@ author Karer < karer . programmer @ gmail . com >
@ author RacheT < rachet @ pylife . pl >
@ copyright 2011 - 2013 Lukasz Biegaj < wielebny @ bestplay . pl >
@ license Dual GPLv2 / MIT
@ package MTA - XyzzyRP
@ link https : //github.com/lpiob/MTA-XyzzyRP GitHub
]]--
-- uniwersalny kod wspoldzielony pomiedzy warsztatami
local strefyNapraw ={
-- Doherty
warsztatIdlewoodStanowsko11 ={
cuboid ={ 1018.79437 , - 1997.34644 , 13.09375 , 9.80 , 5.50 , 5.20 },-- cuboid w ktorym musi znalezc sie pojazd
mpos ={ 1012.56354 , - 1996.40417 , 13.08875 - 0.90 }, -- pozycja markera w ktorym gracz bedzie stal aby naprawiac
faction_id = 3 , -- id frakcji ktora ma do tego dostep
},
-- Doherty
warsztatIdlewoodStanowsko12 ={
cuboid ={ 1018.59558 , - 1989.10437 , 13.09097 , 9.80 , 5.50 , 5.20 },-- cuboid w ktorym musi znalezc sie pojazd
mpos ={ 1013.50098 , - 1989.16235 , 13.08875 - 0.90 }, -- pozycja markera w ktorym gracz bedzie stal aby naprawiac
faction_id = 3 , -- id frakcji ktora ma do tego dostep
},
-- Garcia
warsztatIdlewoodStanowsko13 ={
cuboid ={ - 2331.62 , - 166.85 , 34.5 , 10.0 , 0 , 0 },-- cuboid w ktorym musi znalezc sie pojazd
mpos ={ - 2329.33 , - 163.50 , 34.5 }, -- pozycja markera w ktorym gracz bedzie stal aby naprawiac
faction_id = 3 , -- id frakcji ktora ma do tego dostep
},
}
for i , v in pairs ( strefyNapraw ) do
v . cs = createColCuboid ( unpack ( v . cuboid ))
css = createColCuboid ( - 2304.94 , - 124.98 , 35.32 , 10 , 6 , 6 )
v . marker = createMarker ( v . mpos [ 1 ], v . mpos [ 2 ], v . mpos [ 3 ], "cylinder" , 1 , 0 , 0 , 0 , 100 )
setElementData ( v . marker , "cs" , v . cs )
setElementData ( v . marker , "faction_id" , v . faction_id )
end
-- triggerServerEvent ( "naprawaElementu" , resourceRoot , naprawiany_pojazd , czesc , koszt )
addEvent ( "naprawaElementu" , true )
addEventHandler ( "naprawaElementu" , resourceRoot , function( pojazd , czesc , koszt )
outputDebugString ( "Naprawa elementu " .. czesc .. " za " .. koszt )
takePlayerMoney ( client , koszt )
if koszt > getPlayerMoney ( client ) then
return
end
if ( czesc ==- 1 ) then
-- setElementHealth ( pojazd , 1000 )
local vps ={}
local vds ={}
local vls ={}
for i = 0 , 6 do vps [ i ]= getVehiclePanelState ( pojazd , i ) end
for i = 0 , 3 do vds [ i ]= getVehicleDoorState ( pojazd , i ) end
for i = 0 , 3 do vls [ i ]= getVehicleLightState ( pojazd , i ) end
fixVehicle ( pojazd )
for i = 0 , 6 do setVehiclePanelState ( pojazd , i , vps [ i ]) end
for i = 0 , 3 do setVehicleDoorState ( pojazd , i , vds [ i ]) end
for i = 0 , 3 do setVehicleLightState ( pojazd , i , vls [ i ]) end
triggerClientEvent ( client , "refreshVehicleData" , resourceRoot , pojazd )
elseif czesc >= 0 and czesc <= 6 then
setVehiclePanelState ( pojazd , czesc , 0 )
triggerClientEvent ( client , "refreshVehicleData" , resourceRoot , pojazd )
elseif czesc >= 10 and czesc < 20 then
local drzwi = czesc - 10
setVehicleDoorState ( pojazd , drzwi , 0 )
triggerClientEvent ( client , "refreshVehicleData" , resourceRoot , pojazd )
elseif czesc >= 20 then
local swiatlo = czesc - 20
setVehicleLightState ( pojazd , swiatlo , 0 )
triggerClientEvent ( client , "refreshVehicleData" , resourceRoot , pojazd )
end
end )
--[[
@ author Lukasz Biegaj < wielebny @ bestplay . pl >
@ author RacheT < rachet @ pylife . pl >
@ author karer < karer . programmer @ gmail . com >
@ copyright 2011 - 2013 Lukasz Biegaj < wielebny @ bestplay . pl >
@ license Dual GPLv2 / MIT
@ package MTA - XyzzyRP
@ link https : //github.com/lpiob/MTA-XyzzyRP GitHub
]]--
local punkty_brania_kol ={
-- {- 2042.60 , 162.87 , 28.84 - 0.9 , 1.5 , faction_id = 3 }, -- idlewood
}
local warsztatyid = {
[ 3 ]= true ,
}
for i , v in ipairs ( punkty_brania_kol ) do
v . marker = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], "cylinder" , v [ 4 ], 0 , 0 , 0 , 100 )
setElementData ( v . marker , "braniekola" , true )
setElementData ( v . marker , "faction:id" , v . faction_id )
end
local function czyPracownikWarsztatu ( gracz )
local lfid = getElementData ( gracz , "faction:id" ) or - 1
if not warsztatyid [ lfid ] then return false end
return true
end
local function najblizszeKolo ( gracz , pojazd )
-- easy peasy
local xg , yg , zg = getElementPosition ( gracz )
local najblizszeKolo = nil
local najblizszeDist = 1000
local x , y , z = getElementPosition ( pojazd )
local _ , _ , rz = getElementRotation ( pojazd )
for i = 1 , 4 do
local rrz = math . rad ( rz + 45 +( i - 1 )* 90 )
local x = x + ( 1 * math . sin (- rrz ))
local y = y + ( 1 * math . cos (- rrz ))
if not najblizszeKolo or getDistanceBetweenPoints2D ( x , y , xg , yg )< najblizszeDist then
najblizszeDist = getDistanceBetweenPoints2D ( x , y , xg , yg )
najblizszeKolo = i
end
end
-- ugly
if not najblizszeKolo then return nil end
if najblizszeKolo == 4 then return 3
elseif najblizszeKolo == 3 then return 4 end
return najblizszeKolo
end
local function zalozKolo ( plr )
local x , y , z = getElementPosition ( plr )
local _ , _ , rz = getElementRotation ( plr )
local rrz = math . rad ( rz )
local x = x + ( 1.5 * math . sin (- rrz ))
local y = y + ( 1.5 * math . cos (- rrz ))
local cs = createColSphere ( x , y , z , 2.5 )
local pojazdy = getElementsWithinColShape ( cs , "vehicle" )
destroyElement ( cs )
if ( #pojazdy~=1) then
return false
end
-- okreslamy , kolo ktorego kola jest gracz
local k1 , k2 , k3 , k4 = getVehicleWheelStates ( pojazdy [ 1 ])
if ( k1 == 0 ) and ( k2 == 0 ) and ( k3 == 0 ) and ( k4 == 0 ) then return end
local kolo = najblizszeKolo ( plr , pojazdy [ 1 ])
if not kolo then return end
setPedAnimation ( plr , "MISC" , "pickup_box" , 1 , false , false , true , true )
toggleControl ( plr , "forward" , false )
setTimer ( setPedAnimationProgress , 600 , 1 , plr , "pickup_box" , 0.5 )
setElementData ( plr , "blockSettingAnimation" , true ) -- blokujemy ENTER
if kolo == 1 then
k1 = 0
elseif kolo == 2 then
k2 = 0
elseif kolo == 3 then
k3 = 0
elseif kolo == 4 then
k4 = 0
end
setTimer ( setPedAnimation , 9000 , 1 , plr , "ped" , "phone_in" )
setTimer ( setPedAnimation , 9300 , 1 , plr )
setTimer ( setVehicleWheelStates , 9000 , 1 , pojazdy [ 1 ], k1 , k2 , k3 , k4 )
setTimer ( setElementData , 9000 , 1 , plr , "blockSettingAnimation" , true )
setTimer ( toggleControl , 9000 , 1 , plr , "forward" , true )
zabierzKolo ( plr , 9000 )
end
function zabierzKolo ( el , delay )
local niesionyObiekt = getElementData ( el , "niesioneKolo" )
if niesionyObiekt then
if isElement ( niesionyObiekt ) then
if delay then
setTimer ( destroyElement , delay , 1 , niesionyObiekt )
else
destroyElement ( niesionyObiekt )
end
end
removeElementData ( el , "niesioneKolo" )
setPedWalkingStyle ( el , 0 )
unbindKey ( el , "fire" , "down" , zalozKolo )
return true
end
return false
end
addEventHandler ( "onMarkerHit" , resourceRoot , function( el , md )
if not md or getElementType ( el )~= "player" then return end
if not czyPracownikWarsztatu ( el ) then return end
if not getElementData ( source , "braniekola" ) then return end
if getElementData ( source , "faction:id" ) ~= getElementData ( el , "faction:id" ) then return end
if zabierzKolo ( el ) then return end
local kolo = createObject ( 1098 , 0 , 0 , 0 )
setObjectScale ( kolo , 0.7 )
setElementData ( el , "niesioneKolo" , kolo , false )
-- attachElements ( kolo , el , 0 , 0.4 ,- 0.2 , 0 , 0 , 90 )
bindKey ( el , "fire" , "down" , zalozKolo )
exports [ "bone_attach" ]: attachElementToBone ( kolo , el , 11 , 0.1 ,- 0.1 , 0 )
setPedWalkingStyle ( el , 66 )
end )
pickup = createPickup ( 1012.55634 , - 1992.43018 , 13.08875 , 3 , 1275 , 0 , 0 )
setElementDimension ( pickup , 0 )
addEventHandler ( "onPickupHit" , pickup , function( element )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "Mechanik" ) ) then
cywilt = getTeamFromName ( "CYWILE" )
setPlayerTeam ( element , cywilt )
if getAccountData ( getPlayerAccount ( element ), "stary:skin" ) then
id = tonumber ( getAccountData ( getPlayerAccount ( element ), "stary:skin" ) )
setElementModel ( element , id )
setAccountData ( getPlayerAccount ( element ), "stary:skin" , false )
else
skin = tonumber ( getElementModel ( element ) )
setAccountData ( getPlayerAccount ( element ), "stary:skin" , skin )
setElementModel ( element , 50 )
end
end
end )-- POGO !!!
--[[
myMarker3 = createMarker ( - 2039.64 , 174.76 , 28.84 - 0.9 , 'cylinder' , 1 , 0 , 0 , 0 )
bra3 = createObject ( 11416 , - 2038.88 , 178.76 , 29.84 , 0 , 0 , 0 )
function MarkerHit3 ( hitPlayer , matchingDimension )
local playera = hitPlayer
local easing = "OutBounce"
local time = 5000
if getElementType ( playera ) == "player" then
if isObjectInACLGroup ( 'user.' .. getAccountName ( getPlayerAccount ( playera ) ), aclGetGroup ( "Mechanik" ) ) then
moveObject ( bra3 , time , - 2038.88 , 178.76 , 29.84 - 5.5 , 0 , 0 , 0 , easing )
end
end
end
function MarkerLeave3 ()
local easing2 = "OutBounce"
local time = 5000
moveObject ( bra3 , time , - 2038.88 , 178.76 , 29.84 , 0 , 0 , 0 , easing2 )
end
addEventHandler ( "onMarkerHit" , myMarker3 , MarkerHit3 )
addEventHandler ( "onMarkerLeave" , myMarker3 , MarkerLeave3 )
--]]
local pojazdyPubliczne = {
{ 525 , - 2053.08 , 146.19 , 28.71 , 358.1 , 0.0 , 179.4 },
{ 525 , - 2047.16 , 146.22 , 28.72 , 358.2 , 360.0 , 180.0 },
}
for i , v in ipairs ( pojazdyPubliczne ) do
local pojazd = createVehicle ( v [ 1 ], v [ 2 ], v [ 3 ], v [ 4 ], v [ 5 ], v [ 6 ], v [ 7 ])
setElementData ( pojazd , "pojazd_opis" , "Mech #" .. i .. "" )
setElementFrozen ( pojazd , true )
setElementData ( pojazd , "pojazd_paliwo" , 100 )
end
addEventHandler ( "onVehicleStartEnter" , resourceRoot , function( plr , seat )
if seat == 0 then
local accountName = getAccountName ( getPlayerAccount ( plr ))
if isObjectInACLGroup ( "user." .. accountName , aclGetGroup ( "Mechanik" )) then return end
outputChatBox ( "* Nie jeste? pracownikiem." , plr , 255 , 0 , 0 )
cancelEvent ()
return
end
end )
addEventHandler ( "onVehicleEnter" , resourceRoot , function( plr , seat )
if seat == 0 then
setElementFrozen ( source , false )
setElementData ( source , "pojazd_paliwo" , 100 )
end
end )
c_side
--[[
@ author Lukasz Biegaj < wielebny @ bestplay . pl >
@ author Karer < karer . programmer @ gmail . com >
@ author RacheT < rachet @ pylife . pl >
@ copyright 2011 - 2013 Lukasz Biegaj < wielebny @ bestplay . pl >
@ license Dual GPLv2 / MIT
@ package MTA - XyzzyRP
@ link https : //github.com/lpiob/MTA-XyzzyRP GitHub
]]--
local w_m ={}
-- utils
function math . round ( number , decimals , method )
decimals = decimals or 0
local factor = 10 ^ decimals
if ( method == "ceil" or method == "floor" ) then return math [ method ]( number * factor ) / factor
else return tonumber (( "%." .. decimals .. "f" ): format ( number )) end
end
function string : split ( sep )
local sep , fields = sep or ":" , {}
local pattern = string . format ( "([^%s]+)" , sep )
self : gsub ( pattern , function( c ) fields [ #fields+1] = c end)
return fields
end
w_m . wnd = guiCreateWindow ( 0.1469 , 0.1667 , 0.7344 , 0.675 , "Panel mechanika" , true )
w_m . btn_napraw = guiCreateButton ( 0.0277 , 0.8395 , 0.3064 , 0.1327 , "Napraw" , true , w_m . wnd )
w_m . btn_zamknij = guiCreateButton ( 0.3427 , 0.8395 , 0.3064 , 0.1327 , "Zamknij" , true , w_m . wnd )
w_m . lbl_info = guiCreateLabel ( 0.6 , 0.8395 , 0.35 , 0.1327 , "" , true , w_m . wnd )
w_m . lbl_costinfo = guiCreateLabel ( 0.6 , 0.8395 , 0.35 , 0.1327 , "" , true , w_m . wnd )
guiLabelSetHorizontalAlign ( w_m . lbl_info , "center" , true )
guiLabelSetVerticalAlign ( w_m . lbl_info , "center" )
w_m . grid = guiCreateGridList ( 0.0298 , 0.0895 , 0.9383 , 0.7191 , true , w_m . wnd )
guiGridListSetSelectionMode ( w_m . grid , 1 )
guiGridListSetSortingEnabled ( w_m . grid , false )
w_m . grid_nazwa = guiGridListAddColumn ( w_m . grid , "Nazwa cz??ci" , 0.3 )
w_m . grid_stan = guiGridListAddColumn ( w_m . grid , "Stan cz??ci" , 0.3 )
w_m . grid_koszt = guiGridListAddColumn ( w_m . grid , "Koszt naprawy" , 0.3 )
guiSetVisible ( w_m . wnd , false )
local naprawiany_pojazd = nil
local function kosztNaprawySilnika ( v )
local vhp = 1000 - getElementHealth ( v )
local cenapojazdu = getVehicleHandling ( v ). monetary or 10000
local przebieg =( 10000 - math . min ( getElementData ( v , "przebieg" ) or 5000 , 9999 ))/ 10000
return vhp / 1000 * cenapojazdu * przebieg * 0.002 -- it 's that simple
end
local function kosztNaprawyElementu(v)
local cenapojazdu=getVehicleHandling(v).monetary or 10000
local przebieg=(10000-math.min(getElementData(v,"przebieg") or 5000,9999))/10000
return cenapojazdu*przebieg*0.002 -- it' s that simple
end
local panele ={
[ 0 ]= "Karoseria lewy prz?d" ,
[ 1 ]= "Karoseria prawy prz?d" ,
[ 2 ]= "Karoseria lewy ty?" ,
[ 3 ]= "Karoseria prawy ty?" ,
[ 4 ]= "Szyba przednia" ,
[ 5 ]= "Zderzak z przodu" ,
[ 6 ]= "Zderzak z ty?u"
}
local stanyPaneli ={
[ 0 ]= "100%" ,
[ 1 ]= "66%" ,
[ 2 ]= "33%" ,
[ 3 ]= "0%" ,
}
local nazwyDrzwi ={
[ 0 ]= "Maska" ,
[ 1 ]= "Baga?nik" ,
[ 2 ]= "Drzwi lewy prz?d" ,
[ 3 ]= "Drzwi prawy prz?d" ,
[ 4 ]= "Drzwi lewy ty?" ,
[ 5 ]= "Drzwi prawy ty?"
}
local nazwySwiatel ={
[ 0 ]= "?wiat?o lewy prz?d" ,
[ 1 ]= "?wiat?o prawy prz?d" ,
[ 2 ]= "?wiat?o lewy ty?" ,
[ 3 ]= "?wiat?o prawy ty?"
}
local function fillVehicleData ( v )
guiGridListClear ( w_m . grid )
do
if getElementHealth ( v ) ~= 1000 then
local row = guiGridListAddRow ( w_m . grid )
guiGridListSetItemText ( w_m . grid , row , 1 , "Silnik" , false , false )
guiGridListSetItemData ( w_m . grid , row , 1 , - 1 )
guiGridListSetItemText ( w_m . grid , row , 2 , math . round ( getElementHealth ( v )/ 10 ).. "%" , false , true )
guiGridListSetItemText ( w_m . grid , row , 3 , math . round ( math . abs ( kosztNaprawySilnika ( v ))+ 2 ).. "$" , false , true )
end
end
for i , panel in pairs ( panele ) do
local stan = getVehiclePanelState ( v , i )
if stan ~= 0 then
local koszt = kosztNaprawyElementu ( v )*( getVehiclePanelState ( v , i ))/ 6
local row = guiGridListAddRow ( w_m . grid )
guiGridListSetItemText ( w_m . grid , row , 1 , panel , false , false )
guiGridListSetItemData ( w_m . grid , row , 1 , i )
local stan = stanyPaneli [ getVehiclePanelState ( v , i )]
guiGridListSetItemText ( w_m . grid , row , 2 , stan , false , true )
guiGridListSetItemText ( w_m . grid , row , 3 , math . round ( koszt + 2 ).. "$" , false , true )
end
end
-- drzwi
for i = 0 , 5 do
local stan = getVehicleDoorState ( v , i )
if stan == 2 or stan == 3 or stan == 4 then
local koszt = kosztNaprawyElementu ( v )* 2 / 6
local row = guiGridListAddRow ( w_m . grid )
guiGridListSetItemText ( w_m . grid , row , 1 , nazwyDrzwi [ i ], false , false )
guiGridListSetItemData ( w_m . grid , row , 1 , i + 10 )
guiGridListSetItemText ( w_m . grid , row , 2 , "0%" , false , true )
guiGridListSetItemText ( w_m . grid , row , 3 , math . round ( koszt + 2 ).. "$" , false , true )
end
end
for i = 0 , 3 do
local stan = getVehicleLightState ( v , i )
if stan == 1 then
local koszt = kosztNaprawyElementu ( v )* 2 / 6
local row = guiGridListAddRow ( w_m . grid )
guiGridListSetItemText ( w_m . grid , row , 1 , nazwySwiatel [ i ], false , false )
guiGridListSetItemData ( w_m . grid , row , 1 , i + 20 )
guiGridListSetItemText ( w_m . grid , row , 2 , "0%" , false , true )
guiGridListSetItemText ( w_m . grid , row , 3 , math . round ( koszt + 2 ).. "$" , false , true )
end
end
end
addEventHandler ( "onClientMarkerHit" , resourceRoot , function( el , md )
if not md or el ~= localPlayer then return end
local cs = getElementData ( source , "cs" )
if not cs then return end
if getElementData ( source , "braniekola" ) then return end
if getElementModel ( el ) ~= 50 then return end
local pojazdy = getElementsWithinColShape ( cs , "vehicle" )
if #pojazdy<1 then
outputChatBox ( "Na stanowisku naprawczym nie ma ?adnego pojazdu." )
return
end
if #pojazdy>1 then
outputChatBox ( "Na stanowisku naprawczym jest zbyt du?o pojazd?w." )
return
end
allCost = setTimer (function( plr )
end , 1000 , 0 , el )
fillVehicleData ( pojazdy [ 1 ])
showCursor ( true )
guiSetEnabled ( w_m . btn_napraw , false )
guiSetText ( w_m . lbl_info , "" )
guiSetVisible ( w_m . wnd , true )
guiSetText ( w_m . btn_napraw , string . format ( "Napraw (%s)" , getVehicleName ( pojazdy [ 1 ])) )
naprawiany_pojazd = pojazdy [ 1 ]
end )
addEventHandler ( "onClientMarkerLeave" , resourceRoot , function( el , md )
if el ~= localPlayer then return end
guiSetVisible ( w_m . wnd , false )
showCursor ( false )
naprawiany_pojazd = nil
if allCost and isTimer ( allCost ) then killTimer ( allCost ) end
end )
addEventHandler ( "onClientGUIClick" , w_m . btn_zamknij , function()
guiSetVisible ( w_m . wnd , false )
showCursor ( false )
naprawiany_pojazd = nil
if allCost and isTimer ( allCost ) then killTimer ( allCost ) end
end , false )
addEventHandler ( "onClientGUIClick" , w_m . grid , function()
guiSetText ( w_m . lbl_info , "" )
selectedRow = guiGridListGetSelectedItem ( w_m . grid ) or - 1
if ( selectedRow < 0 ) then
guiSetEnabled ( w_m . btn_napraw , false )
return
end
local multirepair = {}
local rows = guiGridListGetSelectedItems ( w_m . grid )
for k , v in ipairs ( rows ) do
if ( k / 3 == math . round ( k / 3 )) then -- kazde 3 wyniki sa takie same , pomijamy je
table . insert ( multirepair , v )
end
end
totalkoszt = 0
for k , v in ipairs ( multirepair ) do
local koszt = guiGridListGetItemText ( w_m . grid , v . row , 3 )
local koszt = koszt : split ( "$" )
local koszt = tonumber ( koszt [ 1 ])
totalkoszt = totalkoszt + koszt
end
guiSetText ( w_m . lbl_info , string . format ( "W sumie do zap?aty: %s$" , totalkoszt ))
guiSetEnabled ( w_m . btn_napraw , true )
end )
local napraw_lu = getTickCount ()
addEventHandler ( "onClientGUIClick" , w_m . btn_napraw , function()
if getTickCount ()- napraw_lu < 1000 then return end
if not naprawiany_pojazd or not isElement ( naprawiany_pojazd ) then return end
selectedRow = guiGridListGetSelectedItem ( w_m . grid ) or - 1
if selectedRow < 0 then return end
local rows = guiGridListGetSelectedItems ( w_m . grid )
local multirepair = {}
-- musimy sprawdzic , czy gracz zaznaczyl KILKA rowow , czy JEDEN //karer - takie male udogodnienie
for k , v in ipairs ( rows ) do
if ( k / 3 == math . round ( k / 3 )) then -- kazde 3 wyniki sa takie same , pomijamy je
table . insert ( multirepair , v )
end
end
guiSetText ( w_m . lbl_info , "" )
if #multirepair == 1 then
local koszt = guiGridListGetItemText ( w_m . grid , selectedRow , 3 )
local koszt = koszt : split ( "$" )
local koszt = tonumber ( koszt [ 1 ])
if not koszt then return end
if koszt <= 0 then
guiSetText ( w_m . lbl_info , "Ta cz??? jest sprawna." )
return
end
-- if koszt > getPlayerMoney ( localPlayer ) then
-- guiSetText ( w_m . lbl_info , "Nie masz tyle got?wki!" )
-- return
-- end
local czesc = guiGridListGetItemData ( w_m . grid , selectedRow , 1 ) -- numer panelu lub - 1 == silnik
napraw_lu = getTickCount ()
triggerServerEvent ( "naprawaElementu" , resourceRoot , naprawiany_pojazd , czesc , koszt )
elseif #multirepair > 1 then
for i , v in ipairs ( multirepair ) do
local selectedRow = v . row
local koszt = guiGridListGetItemText ( w_m . grid , selectedRow , 3 )
local koszt = koszt : split ( "$" )
local koszt = tonumber ( koszt [ 1 ])
if not koszt then return end
if koszt <= 0 then
break
end
-- if koszt > getPlayerMoney ( localPlayer ) then
-- guiSetText ( w_m . lbl_info , "Nie masz tyle got?wki!" )
-- return
-- end
local czesc = guiGridListGetItemData ( w_m . grid , selectedRow , 1 ) -- numer panelu lub - 1 == silnik
napraw_lu = getTickCount ()
triggerServerEvent ( "naprawaElementu" , resourceRoot , naprawiany_pojazd , czesc , koszt )
end
else
outputDebugScript ( "lss-naprawapojazdow> inna wartosc countRows, should't happen." )
end
end , false )
-- triggerClientEvent ( client , "refreshVehicleData" , resourceRoot , pojazd )
addEvent ( "refreshVehicleData" , true )
addEventHandler ( "refreshVehicleData" , resourceRoot , function( pojazd )
naprawiany_pojazd = pojazd
fillVehicleData ( pojazd )
end )
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-17, 21:26
mlodasnygo
Wiek: 16 Na forum: 3972 dni Posty: 205
Piwa : 518
Musisz pobawi? si? z tym cuboidem, bo nic innego sie p?jdzie..
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2016-01-17, 21:28
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Ale w?a?nie si? bawi?em i nic... :X
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-17, 22:24
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
a takie pytanie czy to masz pod acl czy jak ?
[ Dodano : 2016-01-17, 22:24 ]
i druga sprawa jaki b??d w db 3
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2016-01-18, 14:02
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
To jest ten skrypt, kt?ry ty da?e? na gtao.
A b??d db3
33 linjka
css = createColCuboid ( - 2304.94 , - 124.98 , 35.32 , 10 , 6 , 6 )
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-18, 16:10
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
ale podaj b??d bo ja nie widz? co ty za b??d masz nwm zr?b ss nwm kombinuj i podaj mi ca?y b??d w db jaki masz
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2016-01-18, 16:27
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-18, 16:36
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
masz co? nie tak z cuboidem nwm ustaw bo pewnie co? nie tak jest ustawione a jak ustawiasz skryptem na cuboid czy sam jako? ?
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2016-01-18, 16:37
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Pr?bowa?em sam, ale nie dzia?a :X
[ Dodano : 2016-01-18, 16:40 ]
ze skryptu te? nie dzia?a
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-18, 16:40
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
mo?e jest za wysoko nwm we? z comunity pobierz skrypt do ustawiania cuboida to na pewno pomo?e bo pewnie ?le cuboid ustawiasz a wiem ?e ten skrypt dzia?a bo ja go u?ywa?em na ywg jest i ka?dy go u?ywa no i inni.
[ Dodano : 2016-01-18, 16:44 ]
bo ty to ustawiasz chyba komend? /gp jak widz? to najlepiej by by?o jak by? ustawi? to skryptem z community https://community.multitheftauto.com/index.php?p=resources&s=details&id=3804 jak pomog?em to zostaw piwko ale to nie jest konieczne bo od tego jestem aby pom?c
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2016-01-18, 16:49
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Wysz?o co? takiego createColCuboid(1013.6604, -2000.4019, 13.08875, 23, 5, 5) podmieni?em i dalej nie dzia?a
[ Dodano : 2016-01-18, 16:50 ]
w db 3 b??d?w nie ma ju? :X
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-18, 16:54
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
a w acl jeste? zatrudniony albo auto rozwalone nwm no kombinuj bo to dzia?a?o i dzia?a ka?demu
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2016-01-18, 17:10
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Jak jest mechanik w sf taki jaki pobra?em dzia?a, ale gdy go przenosz? zaczynaj? si? komplikacje
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Wysłany: 2016-01-18, 17:13
Gerano
Mleko,Kakao,LUA
Wiek: 38 Na forum: 4266 dni Posty: 187
Nick w MP: Gerano
Piwa : 1460
a dok?adniej opisz je to mo?e co? poradzimy na to. Pokarz jakie masz acl do mechanika
Podpis
BUDOWA SERWERA: XXX
Prace: XXX%
Wysłany: 2016-01-18, 17:20
venzikk
LUA, MODELER
Wiek: 24 Na forum: 3823 dni Posty: 235
Nick w MP: VenZ
Piwa : 3158
Ten skrypt co wystawi?e?, to jest w?a?nie ten. znajdowa? si? w San Fierro w doherty i tam dzia?a, natomiast gdy przenosz? go do ls nie dzia?a
pickup = createPickup ( 1012.55634 , - 1992.43018 , 13.08875 , 3 , 1275 , 0 , 0 )
setElementDimension ( pickup , 0 )
addEventHandler ( "onPickupHit" , pickup , function( element )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "Mechanik" ) ) then
cywilt = getTeamFromName ( "CYWILE" )
setPlayerTeam ( element , cywilt )
if getAccountData ( getPlayerAccount ( element ), "stary:skin" ) then
id = tonumber ( getAccountData ( getPlayerAccount ( element ), "stary:skin" ) )
setElementModel ( element , id )
setAccountData ( getPlayerAccount ( element ), "stary:skin" , false )
else
skin = tonumber ( getElementModel ( element ) )
setAccountData ( getPlayerAccount ( element ), "stary:skin" , skin )
setElementModel ( element , 50 )
end
end
end
Podpis
Hej
[you]
,Tak ty! Pomogłem ci? zostaw
Pomagam w miarę możliwości
Kontakt:
Discord: VenZio#8080
GG:63293490
skype:szymex1021
Tagi: mechanik
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: