Adham Posted January 24, 2017 Share Posted January 24, 2017 probleam in server side --- Client triggerServerEvent("Save", localPlayer) addEventHandler ( 'onClientGUIClick', root, function ( ) if ( source == TheButton ) then local item = guiComboBoxGetSelected ( com ) local card = guiComboBoxGetItemText( com, item ) local name, email,number = guiGetText ( edit1 ), guiGetText ( edit2 ), guiGetTet ( edit3 ) if #name > 0 and #email > 0 and number > 0 and #card > 0 then if ( guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) ) then triggerServerEvent ( "RentSystem:onCreateNewOrder", localPlayer, name, email, number, card, "classic" ) elseif ( guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) ) then triggerServerEvent ( "RentSystem:onCreateNewOrder", localPlayer, name, email, number, card, "special" ) end guiSetEnabled ( GUIEditor.button[1], false ) end end end ) addEvent ( "RentSystem:onSendSubscribePlayers", true ) addEventHandler ( "RentSystem:onSendSubscribePlayers", root, function ( Table ) for _,v in ipairs ( Table ) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist , row,1 , v.Name , false , false ) guiGridListSetItemText ( gridlist , row,2 , v.card , false , false ) guiGridListSetItemText ( gridlist , row,4 , v.Serial , false , false ) end end ) server side addEventHandler ("onResourceStart", resourceRoot, function () executeSQLQuery ("CREATE TABLE IF NOT EXISTS `Save_Table` (serial,Name,card,Serial)") end ) addEvent ( 'RentSystem:onCreateNewOrder', true ) addEventHandler ( 'RentSystem:onCreateNewOrder', root, function ( name, email, number, card ) if ( name and email and number and card ) then local Name = getPlayerName ( source ) local serial = getPlayerSerial ( source ) local result = executeSQLQuery ( "SELECT * FROM `Save_Table` WHERE `serial` = ?", getPlayerSerial (source) ) if ( result and #result == 0 ) then else triggerClientEvent ( source, "RentSystem:onSendSubscribePlayers",source,result ) end end end ) addEvent("save",true) addEventHandler("save",root, function ( Name,Serial,card ) executeSQLQuery("INSERT INTO Save_Table(serial,Name,Serial,card) VALUES(?,?,?,?)",getPlayerSerial(source),Name,Serial,card) end ) Link to comment
Adham Posted January 24, 2017 Author Share Posted January 24, 2017 warning in server side Link to comment
Gastonito Posted January 24, 2017 Share Posted January 24, 2017 None can help u unless u tell us the problem + any debugging warnings, if u dont undrestand english there is a section where to ask using Arabic Language. Link to comment
Dimos7 Posted January 24, 2017 Share Posted January 24, 2017 we nee see error or warning we can't help you otherwise Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now