Wysłany: 2017-07-15, 17:47
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Witam.
Ot?? mam marker tunera w Las Venturas a gdy do niego wchodz? nie pojawia mi si? panel tunera :(
Prosz? o pomoc.
Wysłany: 2017-07-15, 17:57
Cholewka
Zakorzeniony w LUA
Wiek: 22 Na forum: 3583 dni Posty: 190
Piwa : 707
Daj kod.
Co ja mam wiedzie? z tego, ?e jak wchodzisz do tunera to Ci si? nie odpala panel?
Wysłany: 2017-07-15, 17:58
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
--[[
Resource : Pudding
Developers : Yolos
You have no right to use this code without my permission .
]]
mojeW , mojeH = 1280 , 1024
sW , sH = guiGetScreenSize ()
width , height = ( sW / mojeW ), ( sH / mojeH )
GUIEditor = {
gridlist = {},
progressbar = {},
button = {},
window = {}
}
local cenaCzesci ={
[ 1025 ]= 15500 ,
[ 1073 ]= 19200 ,
[ 1074 ]= 19800 ,
[ 1075 ]= 15200 ,
[ 1076 ]= 17200 ,
[ 1077 ]= 17100 ,
[ 1078 ]= 22500 ,
[ 1079 ]= 14200 ,
[ 1080 ]= 17600 ,
[ 1081 ]= 20200 ,
[ 1082 ]= 14000 ,
[ 1083 ]= 15700 ,
[ 1084 ]= 18000 ,
[ 1085 ]= 21000 ,
[ 1096 ]= 25000 ,
[ 1097 ]= 18700 ,
[ 1098 ]= 20000 ,
-- Stereo
[ 1086 ]= 150000 ,
-- Spoilery
[ 1000 ]= 30000 ,
[ 1001 ]= 35000 ,
[ 1002 ]= 30000 ,
[ 1003 ]= 35000 ,
[ 1014 ]= 24000 ,
[ 1015 ]= 30000 ,
[ 1016 ]= 31000 ,
[ 1023 ]= 34000 ,
[ 1049 ]= 25400 ,
[ 1050 ]= 23000 ,
[ 1058 ]= 23000 ,
[ 1060 ]= 27500 ,
[ 1138 ]= 39000 ,
[ 1139 ]= 34000 ,
[ 1146 ]= 30000 ,
[ 1147 ]= 35500 ,
[ 1158 ]= 41000 ,
[ 1162 ]= 29000 ,
[ 1163 ]= 20000 ,
[ 1164 ]= 45000 ,
-- Progi
[ 1036 ]= 15000 ,
[ 1039 ]= 20000 ,
[ 1040 ]= 18700 ,
[ 1041 ]= 23000 ,
[ 1007 ]= 10000 ,
[ 1017 ]= 10000 ,
[ 1026 ]= 15000 ,
[ 1027 ]= 20000 ,
[ 1030 ]= 15000 ,
[ 1031 ]= 23000 ,
[ 1042 ]= 10000 ,
[ 1047 ]= 18900 ,
[ 1048 ]= 17300 ,
[ 1051 ]= 20000 ,
[ 1052 ]= 18000 ,
[ 1056 ]= 10000 ,
[ 1057 ]= 10000 ,
[ 1062 ]= 10000 ,
[ 1063 ]= 12500 ,
[ 1069 ]= 18000 ,
[ 1070 ]= 15000 ,
[ 1071 ]= 16500 ,
[ 1072 ]= 17500 ,
[ 1090 ]= 17500 ,
[ 1093 ]= 17000 ,
[ 1094 ]= 15000 ,
[ 1095 ]= 10000 ,
[ 1099 ]= 10000 ,
[ 1101 ]= 10000 ,
[ 1102 ]= 7000 ,
[ 1106 ]= 10000 ,
[ 1107 ]= 10000 ,
[ 1108 ]= 10000 ,
[ 1118 ]= 7000 ,
[ 1119 ]= 7000 ,
[ 1120 ]= 7000 ,
[ 1121 ]= 7000 ,
[ 1122 ]= 7000 ,
[ 1124 ]= 7000 ,
[ 1133 ]= 10000 ,
[ 1134 ]= 10000 ,
[ 1137 ]= 10000 ,
-- Bullbar . . ? [ przod ]
[ 1100 ]= 7500 ,
[ 1115 ]= 7500 ,
[ 1116 ]= 7500 ,
[ 1123 ]= 7500 ,
[ 1125 ]= 10000 ,
-- Bullbar . . ? [ ty ?]
[ 1109 ]= 9000 ,
[ 1110 ]= 3000 ,
-- Front Sign [ figurka itd z przodu ]
[ 1111 ]= 6500 ,
[ 1112 ]= 6500 ,
-- Hydraulika
[ 1087 ]= 35100 ,
-- Wydechy
[ 1034 ]= 19000 ,
[ 1037 ]= 20000 ,
[ 1044 ]= 18000 ,
[ 1046 ]= 20000 ,
[ 1018 ]= 17000 ,
[ 1019 ]= 19000 ,
[ 1020 ]= 20000 ,
[ 1021 ]= 18000 ,
[ 1022 ]= 18000 ,
[ 1028 ]= 19000 ,
[ 1029 ]= 20000 ,
[ 1043 ]= 15000 ,
[ 1044 ]= 10000 ,
[ 1045 ]= 15000 ,
[ 1059 ]= 15000 ,
[ 1064 ]= 12000 ,
[ 1065 ]= 13000 ,
[ 1066 ]= 15000 ,
[ 1089 ]= 20000 ,
[ 1092 ]= 17500 ,
[ 1104 ]= 16500 ,
[ 1105 ]= 14500 ,
[ 1113 ]= 12000 ,
[ 1114 ]= 17500 ,
[ 1126 ]= 10000 ,
[ 1127 ]= 11000 ,
[ 1129 ]= 10000 ,
[ 1132 ]= 15000 ,
[ 1135 ]= 10000 ,
[ 1136 ]= 15000 ,
-- Zderzaki [ tylni ]
[ 1149 ]= 40000 ,
[ 1148 ]= 50000 ,
[ 1150 ]= 30000 ,
[ 1151 ]= 35000 ,
[ 1154 ]= 30000 ,
[ 1156 ]= 30000 ,
[ 1159 ]= 35000 ,
[ 1161 ]= 36000 ,
[ 1167 ]= 30000 ,
[ 1168 ]= 25000 ,
[ 1175 ]= 25000 ,
[ 1177 ]= 25000 ,
[ 1178 ]= 29000 ,
[ 1180 ]= 31000 ,
[ 1183 ]= 27000 ,
[ 1184 ]= 30000 ,
[ 1186 ]= 30000 ,
[ 1187 ]= 26000 ,
[ 1192 ]= 20000 ,
[ 1193 ]= 20000 ,
-- Zderzaki [ pzrz ? d ]
[ 1171 ]= 35000 ,
[ 1172 ]= 50000 ,
[ 1140 ]= 35000 ,
[ 1141 ]= 50000 ,
[ 1117 ]= 5000 ,
[ 1152 ]= 30000 ,
[ 1153 ]= 35000 ,
[ 1155 ]= 30000 ,
[ 1153 ]= 30000 ,
[ 1157 ]= 30000 ,
[ 1160 ]= 40000 ,
[ 1165 ]= 40000 ,
[ 1166 ]= 30000 ,
[ 1169 ]= 30000 ,
[ 1170 ]= 35000 ,
[ 1173 ]= 35000 ,
[ 1174 ]= 25000 ,
[ 1176 ]= 25000 ,
[ 1179 ]= 35000 ,
[ 1181 ]= 25000 ,
[ 1182 ]= 23000 ,
[ 1185 ]= 30000 ,
[ 1188 ]= 32000 ,
[ 1189 ]= 29000 ,
[ 1190 ]= 25000 ,
[ 1191 ]= 21000 ,
-- Wloty [ g ? ra ]
[ 1035 ]= 30000 ,
[ 1038 ]= 35000 ,
[ 1006 ]= 19600 ,
[ 1032 ]= 30000 ,
[ 1033 ]= 35000 ,
[ 1053 ]= 35000 ,
[ 1054 ]= 30000 ,
[ 1055 ]= 20000 ,
[ 1061 ]= 20000 ,
[ 1068 ]= 32500 ,
[ 1067 ]= 27500 ,
[ 1088 ]= 23000 ,
[ 1091 ]= 30000 ,
[ 1103 ]= 15000 ,
[ 1128 ]= 50000 , -- DACH DO BLADE
[ 1130 ]= 50000 , -- DACH DO SAVANNA
[ 1131 ]= 50000 , -- DACH DO SAVANNA
-- Wloty [ prz ? d ]
[ 1004 ]= 14000 ,
[ 1005 ]= 16000 ,
[ 1011 ]= 14000 ,
[ 1012 ]= 16000 ,
[ 1142 ]= 12000 ,
[ 1143 ]= 12000 ,
[ 1144 ]= 10000 ,
[ 1145 ]= 10000 ,
-- Dodatkowe lampy
[ 1013 ]= 7000 ,
[ 1024 ]= 8000 ,
}
local nazwaCzesci ={
[ 1025 ]= "Offroad" ,
[ 1073 ]= "Shadow" ,
[ 1074 ]= "Mega" ,
[ 1075 ]= "Rimshine" ,
[ 1076 ]= "Wires" ,
[ 1077 ]= "Classic" ,
[ 1078 ]= "Twist" ,
[ 1079 ]= "Cutter" ,
[ 1080 ]= "Switch" ,
[ 1081 ]= "Grove" ,
[ 1082 ]= "Import" ,
[ 1083 ]= "Dolar" ,
[ 1084 ]= "Trance" ,
[ 1085 ]= "Atomic" ,
[ 1096 ]= "Ahab" ,
[ 1097 ]= "Virtual" ,
[ 1098 ]= "Access" ,
-- Stereo
[ 1086 ]= "Stero" ,
-- Spoilery
[ 1000 ]= "Pro" ,
[ 1001 ]= "Win" ,
[ 1002 ]= "Drag" ,
[ 1003 ]= "Alpha" ,
[ 1014 ]= "Champ" ,
[ 1015 ]= "Race" ,
[ 1016 ]= "Worix" ,
[ 1023 ]= "Furry" ,
[ 1049 ]= "Alien" ,
[ 1050 ]= "X-Flow" ,
[ 1058 ]= "Alien" ,
[ 1060 ]= "X-Flow" ,
[ 1138 ]= "Alien Wentyl" ,
[ 1139 ]= "X-Flow Prog" ,
[ 1146 ]= "Alien wydech" ,
[ 1147 ]= "Alien Prog" ,
[ 1158 ]= "X-Flow" ,
[ 1162 ]= "Alien" ,
[ 1163 ]= "X-Flow" ,
[ 1164 ]= "Alien" ,
-- Progi
[ 1036 ]= "Alien" ,
[ 1039 ]= "X-Flow" ,
[ 1040 ]= "Alien" ,
[ 1041 ]= "X-Flow" ,
[ 1007 ]= "Czysty" ,
[ 1017 ]= "Czysty" ,
[ 1026 ]= "Alien" ,
[ 1027 ]= "Alien" ,
[ 1030 ]= "X-Flow" ,
[ 1031 ]= "X-Flow" ,
[ 1042 ]= "Chrome" ,
[ 1047 ]= "Alien" ,
[ 1048 ]= "X-Flow" ,
[ 1051 ]= "Alien" ,
[ 1052 ]= "X-Flow" ,
[ 1056 ]= "Alien" ,
[ 1057 ]= "X-Flow" ,
[ 1062 ]= "Alien" ,
[ 1063 ]= "X-Flow" ,
[ 1069 ]= "Alien" ,
[ 1070 ]= "X-Flow" ,
[ 1071 ]= "Alien" ,
[ 1072 ]= "X-Flow" ,
[ 1090 ]= "Alien" ,
[ 1093 ]= "X-Flow" ,
[ 1094 ]= "Alien" ,
[ 1095 ]= "X-Flow" ,
[ 1099 ]= "Chrome" ,
[ 1101 ]= "Chrome Flames" ,
[ 1102 ]= "Chrome Strip" ,
[ 1106 ]= "Chrome Arches" ,
[ 1107 ]= "Chrome Strip" ,
[ 1108 ]= "Chrome Strip" ,
[ 1118 ]= "Chrome Trim" ,
[ 1119 ]= "Wheel Covers" ,
[ 1120 ]= "Chrome Trim" ,
[ 1121 ]= "Wheelcovers" ,
[ 1122 ]= "Chrome Flames" ,
[ 1124 ]= "Chrome Arches" ,
[ 1133 ]= "Chrome Strip" ,
[ 1134 ]= "Chrome Strip" ,
[ 1137 ]= "Chrome Strip" ,
-- Bullbar . . ? [ przod ]
[ 1100 ]= "Chrome Grill" ,
[ 1115 ]= "Chrome" ,
[ 1116 ]= "Slamin" ,
[ 1123 ]= "Chrome" ,
[ 1125 ]= "Chrome Lights" ,
-- Bullbar . . ? [ ty ?]
[ 1109 ]= "Chrome" ,
[ 1110 ]= "Slamin" ,
-- Front Sign [ figurka itd z przodu ]
[ 1111 ]= "Figurka" ,
[ 1112 ]= "Figurka" ,
-- Hydraulika
[ 1087 ]= "Hydraulika" ,
-- Wydechy
[ 1034 ]= "Alien" ,
[ 1037 ]= "X-Flow" ,
[ 1044 ]= "Chrome" ,
[ 1046 ]= "Alien" ,
[ 1018 ]= "Upswept" ,
[ 1019 ]= "Twin" ,
[ 1020 ]= "Large" ,
[ 1021 ]= "Medium" ,
[ 1022 ]= "Small" ,
[ 1028 ]= "Alien" ,
[ 1029 ]= "X-Flow" ,
[ 1043 ]= "Slamin" ,
[ 1044 ]= "Chrome" ,
[ 1045 ]= "X-Flow" ,
[ 1059 ]= "X-Flow" ,
[ 1064 ]= "Alien" ,
[ 1065 ]= "Alien" ,
[ 1066 ]= "X-Flow" ,
[ 1089 ]= "X-Flow" ,
[ 1092 ]= "Alien" ,
[ 1104 ]= "Chrome" ,
[ 1105 ]= "Slamin" ,
[ 1113 ]= "Chrome" ,
[ 1114 ]= "Slamin" ,
[ 1126 ]= "Chrome" ,
[ 1127 ]= "Slamin" ,
[ 1129 ]= "Chrome" ,
[ 1132 ]= "Slamin" ,
[ 1135 ]= "Slamin" ,
[ 1136 ]= "Chrome" ,
-- Zderzaki [ tylni ]
[ 1149 ]= "Alien" ,
[ 1148 ]= "X-Flow" ,
[ 1150 ]= "Alien" ,
[ 1151 ]= "X-Flow" ,
[ 1154 ]= "Alien" ,
[ 1156 ]= "X-Flow" ,
[ 1159 ]= "Alien" ,
[ 1161 ]= "X-Flow" ,
[ 1167 ]= "X-Flow" ,
[ 1168 ]= "Alien" ,
[ 1175 ]= "Slamin" ,
[ 1177 ]= "Slamin" ,
[ 1178 ]= "Slamin" ,
[ 1180 ]= "Chrome" ,
[ 1183 ]= "Slamin" ,
[ 1184 ]= "Chrome" ,
[ 1186 ]= "Slamin" ,
[ 1187 ]= "Chrome" ,
[ 1192 ]= "Chrome" ,
[ 1193 ]= "Slamin" ,
-- Zderzaki [ pzrz ? d ]
[ 1171 ]= "Alien" ,
[ 1172 ]= "X-Flow" ,
[ 1140 ]= "X-Flow" ,
[ 1141 ]= "Alien" ,
[ 1117 ]= "Chrome" ,
[ 1152 ]= "X-Flow" ,
[ 1153 ]= "Alien" ,
[ 1155 ]= "Alien" ,
[ 1157 ]= "X-Flow" ,
[ 1160 ]= "Alien" ,
-- Wloty [ g ? ra ]
[ 1128 ]= "Dach" , -- DACH DO BLADE
[ 1130 ]= "Dach" , -- DACH DO SAVANNA
[ 1131 ]= "Dach" , -- DACH DO SAVANNA
-- Wloty [ prz ? d ]
-- Dodatkowe lampy
[ 1013 ]= "Lampa" ,
[ 1024 ]= "Lampa" ,
}
local wykluczoneCzesci ={
}
local idSlotow ={
[ "Hood" ]= 0 ,
[ "Vent" ]= 1 ,
[ "Spoiler" ]= 2 ,
[ "Sideskirt" ]= 3 ,
[ "Front Bullbars" ]= 4 ,
[ "Rear Bullbars" ]= 5 ,
[ "Headlights" ]= 6 ,
[ "Roof" ]= 7 ,
[ "Nitro" ]= 8 ,
[ "Hydraulics" ]= 9 ,
[ "Stereo" ]= 10 ,
[ "Unknown" ]= 11 ,
[ "Wheels" ]= 12 ,
[ "Exhaust" ]= 13 ,
[ "Front Bumper" ]= 14 ,
[ "Rear Bumper" ]= 15 ,
[ "Misc" ]= 16 ,
}
addEvent ( "pokazPanelTuningu" , true )
addEventHandler ( "pokazPanelTuningu" , localPlayer , function( veh )
if not isElement ( GUIEditor . window [ 1 ]) then
if getElementData ( veh , "vehicle:spawn" ) then
showCursor ( true )
veh1 = veh
setElementData ( localPlayer , "tune:car" , veh )
local screenW , screenH = guiGetScreenSize ()
GUIEditor . window [ 1 ] = guiCreateWindow (( screenW - 888 ) / 2 , ( screenH - 546 ) / 2 , 888 * width , 546 * height , "---=== Tuningowanie pojazdu ===---" , false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
GUIEditor . button [ 1 ] = guiCreateButton ( 445 * width , 484 * height , 233 * width , 52 * height , "TUNINGUJ\nDEMONTUJ" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . button [ 2 ] = guiCreateButton ( 212 * width , 484 * height , 233 * width , 52 * height , "ZAMKNIJ OKNO" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FFAAAAAA" )
GUIEditor . gridlist [ 1 ] = guiCreateGridList ( 31 * width , 41 * height , 827 * width , 390 * height , false , GUIEditor . window [ 1 ])
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "ID CZESCI" , 0.15 )
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "TYP" , 0.15 )
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "AKCJA" , 0.15 )
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "KOSZT CZESCI" , 0.15 )
guiGridListAddColumn ( GUIEditor . gridlist [ 1 ], "NAZWA Czesci" , 0.15 )
-- a = 0
for i = 0 , 16 do
if getVehicleUpgradeOnSlot ( veh , i ) ~= 0 then
local a = guiGridListAddRow ( GUIEditor . gridlist [ 1 ])
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 1 , tostring ( getVehicleUpgradeOnSlot ( veh , i )), false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 2 , tostring ( getVehicleUpgradeSlotName ( getVehicleUpgradeOnSlot ( veh , i ))), false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 3 , "demtuning" , false , false )
if cenaCzesci [ getVehicleUpgradeOnSlot ( veh , i )] then
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 4 , tostring ( tonumber ( cenaCzesci [ getVehicleUpgradeOnSlot ( veh , i )]* 9 / 10 )) , false , false )
else
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 4 , "--" , false , false )
end
if nazwaCzesci [ getVehicleUpgradeOnSlot ( veh , i )] then
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 5 , tostring ( nazwaCzesci [ getVehicleUpgradeOnSlot ( veh , i )]), false , false )
else
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 5 , "PuddinG" , false , false )
end
-- a = a + 1
else
for i2 , v2 in ipairs ( getVehicleCompatibleUpgrades ( veh , i )) do
if cenaCzesci [ v2 ] then
if not wykluczoneCzesci [ v2 ] then
if v2 == 1164 then
if getElementModel ( veh ) == 558 then
local a = guiGridListAddRow ( GUIEditor . gridlist [ 1 ])
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 1 , tostring ( v2 ), false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 2 , tostring ( getVehicleUpgradeSlotName ( v2 )), false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 3 , "tuning" , false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 4 , tostring ( cenaCzesci [ v2 ]), false , false )
if nazwaCzesci [ v2 ] then
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 5 , tostring ( nazwaCzesci [ v2 ]), false , false )
else
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 5 , "PuddinG" , false , false )
end
end
else
local a = guiGridListAddRow ( GUIEditor . gridlist [ 1 ])
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 1 , tostring ( v2 ), false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 2 , tostring ( getVehicleUpgradeSlotName ( v2 )), false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 3 , "tuning" , false , false )
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 4 , tostring ( cenaCzesci [ v2 ]), false , false )
if nazwaCzesci [ v2 ] then
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 5 , tostring ( nazwaCzesci [ v2 ]), false , false )
else
guiGridListSetItemText ( GUIEditor . gridlist [ 1 ], a , 5 , "PuddinG" , false , false )
end
-- a = a + 1
end
end
end
end
end
end
GUIEditor . progressbar [ 1 ] = guiCreateProgressBar ( 129 * width , 436 * height , 631 * width , 38 * height , false , GUIEditor . window [ 1 ])
guiProgressBarSetProgress ( GUIEditor . progressbar [ 1 ], 0 )
end
else
setElementData ( localPlayer , "tune:car" , nil )
end
end )
addEvent ( "ukryjPanelTuningu" , true )
addEventHandler ( "ukryjPanelTuningu" , localPlayer , function()
if GUIEditor . window [ 1 ] and isElement ( GUIEditor . window [ 1 ]) then
destroyElement ( GUIEditor . window [ 1 ])
setElementData ( localPlayer , "tune:car" , nil )
showCursor ( false )
end
end )
time = 5000
function onClientGUIClick ()
if GUIEditor . button [ 2 ] and isElement ( GUIEditor . button [ 2 ]) and source == GUIEditor . button [ 2 ] then
if GUIEditor . window [ 1 ] and isElement ( GUIEditor . window [ 1 ]) then
destroyElement ( GUIEditor . window [ 1 ])
showCursor ( false )
end
elseif GUIEditor . button [ 1 ] and isElement ( GUIEditor . button [ 1 ]) and source == GUIEditor . button [ 1 ] then
if GUIEditor . progressbar [ 1 ] and isElement ( GUIEditor . progressbar [ 1 ]) and GUIEditor . gridlist [ 1 ] and isElement ( GUIEditor . gridlist [ 1 ]) then
if guiProgressBarGetProgress ( GUIEditor . progressbar [ 1 ]) == 0 or guiProgressBarGetProgress ( GUIEditor . progressbar [ 1 ]) == 100 then
b = 0
local x , y = guiGridListGetSelectedItem ( GUIEditor . gridlist [ 1 ])
if y == 1 then
removeEventHandler ( "onClientGUIClick" , resourceRoot , onClientGUIClick )
setTimer (function()
b = b + 1
if GUIEditor . progressbar [ 1 ] and isElement ( GUIEditor . progressbar [ 1 ]) then
guiProgressBarSetProgress ( GUIEditor . progressbar [ 1 ], b )
end
end , time / 100 , 100 )
setTimer (function()
addEventHandler ( "onClientGUIClick" , resourceRoot , onClientGUIClick )
local text1 = guiGridListGetItemText ( GUIEditor . gridlist [ 1 ], x , 1 ) -- ID
local text2 = guiGridListGetItemText ( GUIEditor . gridlist [ 1 ], x , 2 ) -- TYP
local text3 = guiGridListGetItemText ( GUIEditor . gridlist [ 1 ], x , 3 ) -- AKCJA
local text4 = guiGridListGetItemText ( GUIEditor . gridlist [ 1 ], x , 4 ) -- CENA
local text5 = guiGridListGetItemText ( GUIEditor . gridlist [ 1 ], x , 5 ) -- nazwa
if text1 and tonumber ( text1 ) and text4 and tonumber ( text4 ) and text3 and tostring ( text3 ) then
-- if not wykluczoneCzesci [ tonumber ( text1 )] then
if cenaCzesci [ tonumber ( text1 )] then
if veh1 and isElement ( veh1 ) and getElementType ( veh1 ) == "vehicle" then
triggerServerEvent ( "montazElementu" , root , veh1 , text3 , text1 , text4 , text5 )
end
end
end
-- end
end , time * 1.14 , 1 )
end
end
end
end
end
addEventHandler ( "onClientGUIClick" , resourceRoot , onClientGUIClick )
Wysłany: 2017-07-15, 18:04
Cholewka
Zakorzeniony w LUA
Wiek: 22 Na forum: 3583 dni Posty: 190
Piwa : 707
Jakie? b??dy w db3? I mo?na poprosi? o wersj? server-side?
Wysłany: 2017-07-15, 18:06
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Brak b??d?w. Tak wygl?da po stronie servera
createBlip ( 1064.77 , 1763.22 , 10.82 , 27 , 2 , 0 , 0 , 0 , 0 , 0 , 275 )
local stanowiskaSwiatla = {
k ={
mpos ={ 1107.20 , 1797.69 , 10.82 }, -- marker
cpos ={ 1106.95 , 1794.79 , 10.82 , 4 }, -- cuboid sphere
job_id = "Tuner LV" , -- ( id ) frakcja kt ? ra b ? dzie mia ? a dost ? p
text = "Monta? tuningu"
},
x ={
mpos ={ 1105.78 , 1789.09 , 10.82 }, -- marker
cpos ={ 1107.32 , 1786.08 , 10.82 , 4 }, -- cuboid sphere
job_id = "Tuner LV" , -- ( id ) frakcja kt ? ra b ? dzie mia ? a dost ? p
text = "Monta? tuningu"
},
}
niewspiera_tuningu = {
[ 503 ] = true ,
}
for i , v in pairs ( stanowiskaSwiatla ) do
v . cuboid = createColSphere ( v . cpos [ 1 ], v . cpos [ 2 ], v . cpos [ 3 ], v . cpos [ 4 ])
v . marker = createMarker ( v . mpos [ 1 ], v . mpos [ 2 ], v . mpos [ 3 ]- 0.80 , "cylinder" , 1.5 , 0 , 0 , 255 , 100 )
setElementData ( v . marker , "marker:duty" , v . job_id )
setElementData ( v . marker , "marker:cuboid" , v . cuboid )
local t = createElement ( "text" )
setElementData ( t , "name" , v . text )
setElementPosition ( t , v . mpos [ 1 ], v . mpos [ 2 ], v . mpos [ 3 ])
addEventHandler ( "onMarkerHit" , v . marker , function( el , md )
if getElementType ( el )~= "player" then return end
local cs = getElementData ( source , "marker:cuboid" )
if not cs then return end
local job = getElementData ( source , "marker:duty" )
local ljob = getElementData ( el , "player:duty" )
if job ~= ljob then
outputChatBox ( " Nie jeste? zatrudniony w tym warsztacie." , el , 255 , 0 , 0 )
return
end
local vehicles = getElementsWithinColShape ( cs , "vehicle" )
if #vehicles < 1 then
outputChatBox ( " Na stanowisku monta?u nie ma ?adnego pojazdu." , el , 255 , 0 , 0 )
return
end
if #vehicles > 1 then
outputChatBox ( " Na stanowisku monta?u jest zbyt du?o pojazd?w." , el , 255 , 0 , 0 )
return
end
if getElementHealth ( vehicles [ 1 ]) < 969 then
outputChatBox ( " Pojazd jest zbyt bardzo uszkodzony." , el , 255 , 0 , 0 )
return
end
if niewspiera_tuningu [ getElementModel ( vehicles [ 1 ])] then outputChatBox ( "* Tego pojazdu nie mo?esz tuningowa?!" , el ) return end
triggerClientEvent ( el , "pokazPanelTuningu" , el , vehicles [ 1 ])
end )
end
local t = createElement ( "text" )
setElementData ( t , "scale" , 1.5 )
setElementData ( t , "name" , "Pieni?dze za tuning lub demonta? system pobiera od mechanika\nJezeli jaki? ci? oszuka? zglo? to na forum!\nMaksymalna doliczka: 2000PLN!" )
setElementPosition ( t , 1099.50 , 1790.40 , 10.82 )
Wysłany: 2017-07-15, 18:08
STOPseba
Emeryt na scenie MTA
Wiek: 25 Na forum: 3771 dni Posty: 448
Nick w MP: STOPseba
Piwa : 5014
DaVeCS , Masz uruchomiony zas?b ogrpg-jobs oraz jeste? dodany w mysql jako tuner?
Wysłany: 2017-07-15, 18:11
DaVeCS
Mapper
Wiek: 31 Na forum: 3386 dni Posty: 193
Nick w MP: DaVe
Piwa : 59
Tak jestem
Normalnie loguj? si? na s?u?b? i wszystko dzia?a pr?cz tego ?e panel si? nie wy?wietla
[ Dodano : 2017-07-15, 18:24 ]
Wszystko sprawdza?em kilka razy, kolega wjecha? na stanowisko ja wchodze w marker i panel nie wy?wietla si?
Tagi: tuner
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: