Wysłany: 2017-06-10, 20:15
Pemo97
Wiek: 26 Na forum: 3822 dni Posty: 49
Piwa : 3
Witam, mam skrypt CL-TuningMechaniczny i poprostu polega na tym, ?e daje mk1,mk2 i mk3 lecz tak nie jest. Zabiera pieni?dze a tego nie daje. Wpis w konsoli:
[2017-06-10 20] ERROR: CL-TuningMechaniczny/TuningMechaniczny_s.lua:52: exports: Call to non-running server resource (1) [string "?"]
server
mk1 = 100000
mk2 = 150000
rh = 50000
maskowanie = 375000
local licz = {}
local t = createElement ( 'text' )
setElementData ( t , 'name' , '.createYourWorld\nTuning mechaniczny' )
setElementPosition ( t , 100.85 , - 191.72 , 1.61 + 0.5 )
local t = createElement ( 'text' )
setElementData ( t , 'name' , '.createYourWorld\nTutaj powstaje stanowisko\ntuningu wizualnego!' )
setElementPosition ( t , 100.00 , - 156.24 , 2.60 + 0.5 )
addEvent ( "mk1" , true )
addEventHandler ( "mk1" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( mk1 )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET um1=1 WHERE id=?" , id )
exports [ "1" ]: outputNotificationBox ( source , "#00ff00Pomy?lnie zamontowano #00ccccFiltr sto?kowy#00cc00. Oddaj auto do przecho aby zobaczy? efekty!" , source , true )
takePlayerMoney ( source , mk1 )
else
exports [ "1" ]: outputNotificationBox ( source , "#ff0000Masz za ma?o pieni?dzy, ?eby kupi? Filtr sto?kowy!" )
end
end
)
addEvent ( "mk2" , true )
addEventHandler ( "mk2" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( mk2 )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET um2=1 WHERE id=?" , id )
exports [ "1" ]: outputNotificationBox ( source , "#00ff00Pomy?lnie zamontowano #00ccccBiTurbo#00cc00. Oddaj auto do przecho aby zobaczy? efekty!" )
takePlayerMoney ( source , mk2 )
else
exports [ "1" ]: outputNotificationBox ( source , "#ff0000Masz za ma?o pieni?dzy, ?eby kupi? BiTurbo!" )
end
end
)
addEvent ( "rh" , true )
addEventHandler ( "rh" , root , function()
pojazd = getPedOccupiedVehicle ( source )
if not pojazd then return end
if ( getPlayerMoney ( source ) > tonumber ( rh )) then
local id = getElementData ( pojazd , "vehicle:id" )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET um=3 WHERE id=?" , id )
exports [ "1" ]: outputNotificationBox ( source , "#00ff00Pomy?lnie zamontowano #00ccccZawieszenie pneumatyczne#00cc00. Oddaj auto do przecho aby zobaczy? efekty!" )
takePlayerMoney ( source , rh )
else
exports [ "1" ]: outputNotificationBox ( source , "#ff0000Masz za ma?o pieni?dzy, ?eby kupi? Zawieszenie pneumatyczne" )
end
end
)
addEvent ( "naped" , true )
addEventHandler ( "naped" , getRootElement (), function()
local hajs = getPlayerMoney ( source )
local ccar = getPedOccupiedVehicle ( source )
if not ccar then outputChatBox ( "Musisz by? w poje?dzie" , source , 255 , 255 , 255 ) return end
if getElementData ( plr , "player:organization" ) ~= "Good Workshop" then outputChatBox ( "* Aby u?y? tej komendy, musisz nale?e? do organizacji Good Workshop!" , source , 255 , 255 , 255 ) return end
if hajs < 90000 then outputChatBox ( "* Nie masz tyle pieni?dzy! :c" , source , 255 , 255 , 255 ) return end
local id = getElementData ( ccar , "vehicle:id" )
if not id then return end
local qr = exports [ 'ogrpg-db' ]: dbGet ( "SELECT * FROM ogrpg_vehicles WHERE id=? AND naped=?" , getElementData ( ccar , "vehicle:id" ), "1" )
if #qr == 1 then outputChatBox("Posiadasz ju? te ulepszenie!", source, 255, 255, 255) return end
-- exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET naped=1 WHERE ownedPlayer=? AND id=?" , getElementData ( source , "player:uid" ), getElementData ( ccar , "vehicle:id" ))
exports [ "ogrpg-vehicles" ]: onSaveVehicle ( ccar )
destroyElement ( ccar )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET parking=1,tp_to_parking=? WHERE id=?" , "MONTAZ NAPEDU" , id )
exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_vehicles SET naped=1 WHERE id=?" , id )
outputChatBox ( "Monta? nap?du 4x4 przebieg? pomy?lnie, pojazd zosta? przeniesiony do przechowywalni" , source , 255 , 255 , 255 )
takePlayerMoney ( source , 90000 )
end )
client:
GUIEditor = {
button = {},
window = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
GUIEditor . window [ 1 ] = guiCreateWindow ( 638 , 207 , 435 , 484 , "Montowanie Uk?adu Mechanicznego" , false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
guiSetAlpha ( GUIEditor . window [ 1 ], 0.83 )
GUIEditor . button [ 1 ] = guiCreateButton ( 101 , 37 , 242 , 91 , "Filtr sto?kowy\n100,000 PLN" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FF05FE00" )
GUIEditor . button [ 2 ] = guiCreateButton ( 100 , 155 , 243 , 90 , "BiTurbo\n150,000 PLN" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FF05FE00" )
GUIEditor . button [ 3 ] = guiCreateButton ( 99 , 272 , 244 , 85 , "Zawieszenie pneumatyczne\n50,000 PLN" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 3 ], "NormalTextColour" , "FF05FE00" )
GUIEditor . button [ 8 ] = guiCreateButton ( 98 , 375 , 245 , 84 , "Zamknij\nOkno" , false , GUIEditor . window [ 1 ])
guiSetProperty ( GUIEditor . button [ 8 ], "NormalTextColour" , "FFFD0000" )
end
)
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
guiSetVisible ( GUIEditor . window [ 1 ], false )
end
)
marker = createMarker ( 100.85 , - 191.72 , 1.61 - 1.2 , 'cylinder' , 3.5 , 0 , 125 , 255 , 125 )
createBlip ( 100.83 , - 192.21 , 1.61 , 26 , 2 , 255 , 0 , 0 , 255 , 0 , 100 )
function hit ( plr , md )
if plr ~= localPlayer then return end
if not isPedInVehicle ( localPlayer ) then return end
guiSetVisible ( GUIEditor . window [ 1 ], true )
showCursor ( true )
setElementFrozen ( pojazd , true )
end
addEventHandler ( "onClientMarkerHit" , marker , hit )
function hit ( plr , md )
if plr ~= localPlayer then return end
if not isPedInVehicle ( localPlayer ) then return end
guiSetVisible ( GUIEditor . window [ 1 ], true )
showCursor ( true )
setElementFrozen ( pojazd , true )
end
addEventHandler ( "onClientMarkerHit" , marker2 , hit )
function mk1 ()
if source ~= GUIEditor . button [ 1 ] then return end
triggerServerEvent ( "mk1" , localPlayer )
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
setElementFrozen ( pojazd , false )
end
addEventHandler ( "onClientGUIClick" , root , mk1 )
function mk2 ()
if source ~= GUIEditor . button [ 2 ] then return end
triggerServerEvent ( "mk2" , localPlayer )
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
setElementFrozen ( pojazd , false )
end
addEventHandler ( "onClientGUIClick" , root , mk2 )
function rh ()
if source ~= GUIEditor . button [ 3 ] then return end
triggerServerEvent ( "rh" , localPlayer )
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
setElementFrozen ( pojazd , false )
end
addEventHandler ( "onClientGUIClick" , root , rh )
function zamknij ()
if source ~= GUIEditor . button [ 8 ] then return end
guiSetVisible ( GUIEditor . window [ 1 ], localPlayer )
setElementFrozen ( pojazd , false )
end
addEventHandler ( "onClientGUIClick" , root , zamknij )
function zamykamy ()
if source ~= GUIEditor . button [ 8 ] then return end
guiSetVisible ( GUIEditor . window [ 1 ], false )
setElementFrozen ( pojazd , false )
setElementFrozen ( plr , false )
showCursor ( false )
end
addEventHandler ( "onClientGUIClick" , root , zamykamy )
Ostatnio zmieniony przez Dexnes_ 2017-06-10, 21:01, w całości zmieniany 1 raz
Więcej szczegółów
Wystawiono 1 piw(a):konrado35
Wysłany: 2017-06-10, 20:27
PapaSmerf
Wiek: 25 Na forum: 3526 dni Posty: 237
Piwa : 3857
No nie masz skryptu na notyfikacje ;=;
exports [ "1" ]: outputNotificationBox ( source , "#00ff00Pomy?lnie zamontowano #00ccccZawieszenie pneumatyczne#00cc00. Oddaj auto do przecho aby zobaczy? efekty!" )
Wysłany: 2017-06-10, 20:40
Pemo97
Wiek: 26 Na forum: 3822 dni Posty: 49
Piwa : 3
Wgra?em na serwer i dalej to samo..
Wysłany: 2017-06-10, 20:57
Dexnes_
Tiger
Wiek: 26 Na forum: 4402 dni Posty: 620
Nick w MP: Dexnes
Piwa : 1394
Pemo97 , Czy ten skrypt jest w??czony i nosi nazw? "1" ?
Wysłany: 2017-06-10, 22:16
PapaSmerf
Wiek: 25 Na forum: 3526 dni Posty: 237
Piwa : 3857
"BlackGamePL" napisał/a :Pemo97 , Czy ten skrypt jest w??czony i nosi nazw? "1" ?
1 to nazwa tych notyfikacji
Wysłany: 2017-06-10, 23:31
Pemo97
Wiek: 26 Na forum: 3822 dni Posty: 49
Piwa : 3
Tak zmieni?em nazwe, kolejny b??d:
[2017-06-10 23:30] ERROR: CL-TuningMechaniczny/TuningMechaniczny_s.lua:22: call: failed to call '1:outputNotificationBox' [string "?"]
Wysłany: 2017-06-10, 23:37
PapaSmerf
Wiek: 25 Na forum: 3526 dni Posty: 237
Piwa : 3857
no nie mo?e sie z tym polaczyc w ogole masz to wgrane czy tylko nazwe se dales.
Wysłany: 2017-06-11, 09:06
Pemo97
Wiek: 26 Na forum: 3822 dni Posty: 49
Piwa : 3
Wysłany: 2017-06-11, 09:29
ExtreM
Profesjonalny Mapper
Wiek: 33 Na forum: 3478 dni Posty: 104
Nick w MP: ExtreM
Piwa : 462
Czy przypadkiem MTA nie czyta skrypt?w cyframi ?
Podpis
Discord : ExtreM#7905
Wykonuję profesjonalne mapy/interiory/exteriory na zamówienie!
Wysłany: 2017-06-11, 10:59
Kalizman
Wiek: 23 Na forum: 3652 dni Posty: 1394
Piwa : 4619
Poka? kod i met? tych notyfikacji
Tagi: tuning :: mechaniczny
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: