Wysłany: 2018-01-17, 13:36
NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
Siema bawiac sie dzis w LUA. Wykombinowalem dosyc prosty salon w GUI. Lecz niestety skrypt do konca mi nie dziala, gdyz po prostu salon nie Exportuje pojazdow do MySql. Pomoc w rozwiazaniu wynagradzam zimnym
B??d jaki mi wyskakuje:
[2018-01-17 13:40] WARNING: [Baza_danych]/pyc-db/s_db.lua:19: dbExec failed; (1048) Column 'ownedPlayer' cannot be null
Strona Servera:
Buffalo = 1
BuyMarker = createMarker (- 1969.42 , 290.70 , 35.17 - 0.9 , "cylinder" , 1 , 25 , 213 , 15 , 140 )
function Sklepik ( el , md )
if not md or getElementType ( el ) ~= "player" then return end
triggerClientEvent ( el , "PokazGUI" , resourceRoot )
setMarkerColor ( BuyMarker , 25 , 213 , 15 , 145 )
end
addEventHandler ( "onMarkerHit" , BuyMarker , Sklepik )
addEventHandler ( "onMarkerLeave" , BuyMarker , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
setMarkerColor ( BuyMarker , 25 , 213 , 15 , 145 )
end )
addEvent ( "DajBuffa" , true )
addEventHandler ( "DajBuffa" , root , function()
if getPlayerMoney ( source ) < Buffalo then
outputChatBox ( " Nie posiadasz tyle pieni?dzy!" , source )
return
end
takePlayerMoney ( source , Buffalo )
local rid = getElementData ( source , 'player:uid' ) or 0
exports [ "aw-noti" ]: noti ( " Zakupi?e? sw?j pojazd Buffalo, znajdziesz go w przechowalni." , source )
exports [ "pyc-db" ]: dbSet ( "INSERT INTO pojazdy (model,ownedPlayer,mileage,registered,parking) VALUES (402,?,1,?,1)" , model , getElementData ( source , "player:uid" ), mileage , "true" )
end )
Strona Clienta:
local screenW , screenH = guiGetScreenSize ()
panel = false
function PanelGUI ()
dxDrawText ( "Model Pojazdu: Buffalo\nCena Pojazdu: 1 PLN" , screenW * 0.2062 , screenH * 0.2979 , screenW * 0.4141 , screenH * 0.3896 , tocolor ( 255 , 255 , 255 , 255 ), 1.00 , "default-bold" , "center" , "center" , false , false , false , false , false )
end
addEvent ( "PokazGUI" , true )
addEventHandler ( "PokazGUI" , resourceRoot , function()
if panel == false then
addEventHandler ( "onClientRender" , root , PanelGUI )
tick = getTickCount ()
panel = true
showCursor ( true )
end
end )
function ZamknijOkno ( button , state )
if panel and button == "left" and state == "down" then
if cursorPosition ( screenW * 0.5695 , screenH * 0.6302 , screenW * 0.1193 , screenH * 0.0547 ) then
removeEventHandler ( "onClientRender" , root , PanelGUI )
panel = false
showCursor ( false )
end
end
end
addEventHandler ( "onClientClick" , getRootElement (), ZamknijOkno )
function ZakupPojazd ( button , state )
if panel and button == "left" and state == "down" then
if cursorPosition ( screenW * 0.2062 , screenH * 0.2979 , screenW * 0.4141 , screenH * 0.3896 ) then
triggerServerEvent ( "DajBuffa" , localPlayer )
end
end
end
addEventHandler ( "onClientClick" , getRootElement (), ZakupPojazd )
function cursorPosition ( x , y , w , h )
if ( not isCursorShowing ()) then
return false
end
local mx , my = getCursorPosition ()
local fullx , fully = guiGetScreenSize ()
cursorx , cursory = mx * fullx , my * fully
if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then
return true
else
return false
end
end
function filedelet ()
if fileExists ( "salon_c.lua" ) then
fileDelete ( "salon__c.lua" )
end
end
addEventHandler ( "onClientResourceStart" , getResourceRootElement ( getThisResource ()), filedelet )
addEventHandler ( "onClientPlayerQuit" , getRootElement (), filedelet )
addEventHandler ( "onClientPlayerJoin" , getRootElement (), filedelet )
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Wysłany: 2018-01-17, 15:37
Barcioo
Kiedyś to było ST
Wiek: 26 Na forum: 4049 dni Posty: 458
Nick w MP: Bartek.
Piwa : 1887
Nie masz kolumny w msql pod nazw? ' ownedPlayer '
Podpis
Kanał Youtube;
A tu zapraszam
[you]
, pomogłem Ci? Wynagrodź mnie
SUPPORT TEAM - 2016-09-03 do 2018-05-25
Test Mod - 2018-05-25
1k dni na Forum - 2018-01-28
GG: 62111935
Więcej szczegółów
Wystawiono 1 piw(a):NoKill1997
Wysłany: 2018-01-17, 15:56
NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
Tabela jest stworzona.
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Wysłany: 2018-01-17, 16:00
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
NoKill1997 , Tabela to pojazdy. Kolumny to:
Kod:
model,ownedPlayer,mileage,registered,parking
Skrypt nie rozpoznaje kolumny "ownedPlayer".
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Więcej szczegółów
Wystawiono 1 piw(a):NoKill1997
Wysłany: 2018-01-17, 18:06
NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
"_Mike" napisał/a :NoKill1997 , Tabela to pojazdy. Kolumny to:
Kod:
model,ownedPlayer,mileage,registered,parking
Skrypt nie rozpoznaje kolumny "ownedPlayer".
Kurcze, a czy m?g?by? mnie jako? naprowazic na to aby ten skrypt rozpoznawal ta kolumn??
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Wysłany: 2018-01-17, 18:37
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"NoKill1997" napisał/a : "_Mike" napisał/a :NoKill1997 , Tabela to pojazdy. Kolumny to:
Kod:
model,ownedPlayer,mileage,registered,parking
Skrypt nie rozpoznaje kolumny "ownedPlayer".
Kurcze, a czy m?g?by? mnie jako? naprowazic na to aby ten skrypt rozpoznawal ta kolumn??
Posiadasz takow? tabel? w Swojej bazie danych? R?wnie dobrze sprawd? czy kolumna ownedPlayer jest sprawdzana jako liczba, gdy? o ile si? nie myl? to ownedPlayer to takie UID gracza, tak?e sprawd? i napisz
Więcej szczegółów
Wystawiono 1 piw(a):NoKill1997
Wysłany: 2018-01-17, 22:24
NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
Do zamkni?cia naprawi?em
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak
Tagi: nie :: działa :: export
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: