WTF_ Posted December 1, 2017 Share Posted December 1, 2017 (edited) executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Pizaa` (playerSerial, pizaa) ' ) addCommandHandler( 'addPizaa', function(commandName,NumberPizaa,source) local checkData = executeSQLQuery( ' SELECT * FROM `Pizaa` WHERE playerSerial = ? ', getPlayerSerial(source) ) if NumberPizaa then if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Pizaa` (playerSerial, pizaa) VALUES(?, ?) ', getPlayerSerial(source), NumberPizaa ) outputChatBox('You Have Add'..NumberPizaa) else executeSQLQuery( ' UPDATE`Pizaa` SET playerSerial = ?, pizaa = pizaa + NumberPizaa ', getPlayerSerial(source)) end else outputChatBox('error') end end ) addCommandHandler( 'checkPizaa', function(source) local checkPizaa = executeSQLQuery( ' SELECT * FROM `Pizaa` WHERE playerSerial = ? ', getPlayerSerial(source) ) if ( type ( checkPizaa ) == 'table' and #checkPizaa == 0 or not checkPizaa ) then else local x = checkPizaa[1]['pizaa'] outputChatBox ( 'you Have Buy'..x ) end end ) https://c.top4top.net/p_70066xjf1.png شباب بالله بتجيني مشاكل في المود ابي انه لما حد يكتب addPizaa بيضيف بيتزا لقاعدة البينانات ويحفضها وبعدين لما اكتب checkPizaa بيجيني كم شريت يا ريت تشوفو صورة الدي بيق في الصورة فوق وتقولو وش الغلط Edited December 1, 2017 by WTF_ Link to comment
Ahmed Ly Posted December 1, 2017 Share Posted December 1, 2017 executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Pizaa2` (playerSerial, pizaa) ' ); addCommandHandler( 'addPizaa', function(player,commandName,NumberPizaa) local checkData = executeSQLQuery( ' SELECT * FROM `Pizaa2` WHERE playerSerial = ? ', getPlayerSerial(player) ); if NumberPizaa ~= "" then if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Pizaa2` (playerSerial, pizaa) VALUES(?, ?) ', getPlayerSerial(player),tonumber(NumberPizaa)); outputChatBox("You Have Add: "..NumberPizaa.."",player,,255,0,0,true); else executeSQLQuery( 'UPDATE`Pizaa2` SET playerSerial = ?, pizaa = ?',getPlayerSerial(player),tonumber(NumberPizaa)); end else outputChatBox('error') end end ) addCommandHandler( 'checkPizaa', function(p) local checkPizaa = executeSQLQuery( ' SELECT * FROM `Pizaa2` WHERE playerSerial = ? ', getPlayerSerial(p) ); if ( type ( checkPizaa ) == 'table' and #checkPizaa == 0 or not checkPizaa ) then else local x = checkPizaa[1]['pizaa'] outputChatBox ("you Have Buy: "..x.."",p,255,0,0,true); end end ) Link to comment
WTF_ Posted December 1, 2017 Author Share Posted December 1, 2017 3 hours ago, Ahmed Ly said: executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Pizaa2` (playerSerial, pizaa) ' ); addCommandHandler( 'addPizaa', function(player,commandName,NumberPizaa) local checkData = executeSQLQuery( ' SELECT * FROM `Pizaa2` WHERE playerSerial = ? ', getPlayerSerial(player) ); if NumberPizaa ~= "" then if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Pizaa2` (playerSerial, pizaa) VALUES(?, ?) ', getPlayerSerial(player),tonumber(NumberPizaa)); outputChatBox("You Have Add: "..NumberPizaa.."",player,,255,0,0,true); else executeSQLQuery( 'UPDATE`Pizaa2` SET playerSerial = ?, pizaa = ?',getPlayerSerial(player),tonumber(NumberPizaa)); end else outputChatBox('error') end end ) addCommandHandler( 'checkPizaa', function(p) local checkPizaa = executeSQLQuery( ' SELECT * FROM `Pizaa2` WHERE playerSerial = ? ', getPlayerSerial(p) ); if ( type ( checkPizaa ) == 'table' and #checkPizaa == 0 or not checkPizaa ) then else local x = checkPizaa[1]['pizaa'] outputChatBox ("you Have Buy: "..x.."",p,255,0,0,true); end end ) شكرا لك بجربه وإنشاء الله يشتغل 1 Link to comment
iMr.WiFi..! Posted December 2, 2017 Share Posted December 2, 2017 16 hours ago, Ahmed Ly said: executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Pizaa2` (playerSerial, pizaa) ' ); addCommandHandler( 'addPizaa', function(player,commandName,NumberPizaa) local checkData = executeSQLQuery( ' SELECT * FROM `Pizaa2` WHERE playerSerial = ? ', getPlayerSerial(player) ); if NumberPizaa ~= "" then if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Pizaa2` (playerSerial, pizaa) VALUES(?, ?) ', getPlayerSerial(player),tonumber(NumberPizaa)); outputChatBox("You Have Add: "..NumberPizaa.."",player,,255,0,0,true); else executeSQLQuery( 'UPDATE`Pizaa2` SET playerSerial = ?, pizaa = ?',getPlayerSerial(player),tonumber(NumberPizaa)); end else outputChatBox('error') end end ) addCommandHandler( 'checkPizaa', function(p) local checkPizaa = executeSQLQuery( ' SELECT * FROM `Pizaa2` WHERE playerSerial = ? ', getPlayerSerial(p) ); if ( type ( checkPizaa ) == 'table' and #checkPizaa == 0 or not checkPizaa ) then else local x = checkPizaa[1]['pizaa'] outputChatBox ("you Have Buy: "..x.."",p,255,0,0,true); end end ) المفروض تزود على البيتزا في التحديث مو تحدد القيمة , executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Pizaa` (playerSerial, pizaa) ' ) addCommandHandler( 'addPizaa', function(source, commandName, NumberPizaa ) local checkData = executeSQLQuery( 'SELECT * FROM `Pizaa` WHERE playerSerial = ? ', getPlayerSerial(source) ) if NumberPizaa then if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Pizaa` (playerSerial, pizaa) VALUES(?, ?) ', getPlayerSerial(source), NumberPizaa ) outputChatBox('You Have Add '..NumberPizaa) else executeSQLQuery( ' UPDATE`Pizaa` SET pizaa = pizaa + '..NumberPizaa..' WHERE playerSerial = ?', getPlayerSerial(source)) end else outputChatBox('Bad syntax @1: Usage [ /addPizaa <pizza number> ]') end end ) addCommandHandler( 'checkPizaa', function(source) local checkPizaa = executeSQLQuery( ' SELECT * FROM `Pizaa` WHERE playerSerial = ? ', getPlayerSerial(source) ) if ( type ( checkPizaa ) == 'table' and #checkPizaa ~= 0 and checkPizaa ) then local x = checkPizaa[1]['pizaa'] outputChatBox ( 'You Have Buy '..x ) end end ) Link to comment
WTF_ Posted December 2, 2017 Author Share Posted December 2, 2017 5 minutes ago, iMr.WiFi..! said: المفروض تزود على البيتزا في التحديث مو تحدد القيمة , executeSQLQuery( ' CREATE TABLE IF NOT EXISTS `Pizaa` (playerSerial, pizaa) ' ) addCommandHandler( 'addPizaa', function(source, commandName, NumberPizaa ) local checkData = executeSQLQuery( 'SELECT * FROM `Pizaa` WHERE playerSerial = ? ', getPlayerSerial(source) ) if NumberPizaa then if ( type ( checkData ) == 'table' and #checkData == 0 or not checkData ) then executeSQLQuery( ' INSERT INTO `Pizaa` (playerSerial, pizaa) VALUES(?, ?) ', getPlayerSerial(source), NumberPizaa ) outputChatBox('You Have Add '..NumberPizaa) else executeSQLQuery( ' UPDATE`Pizaa` SET pizaa = pizaa + '..NumberPizaa..' WHERE playerSerial = ?', getPlayerSerial(source)) end else outputChatBox('Bad syntax @1: Usage [ /addPizaa <pizza number> ]') end end ) addCommandHandler( 'checkPizaa', function(source) local checkPizaa = executeSQLQuery( ' SELECT * FROM `Pizaa` WHERE playerSerial = ? ', getPlayerSerial(source) ) if ( type ( checkPizaa ) == 'table' and #checkPizaa ~= 0 and checkPizaa ) then local x = checkPizaa[1]['pizaa'] outputChatBox ( 'You Have Buy '..x ) end end ) شكراااااااااااا لك والله نفعتني Link to comment
iMr.WiFi..! Posted December 2, 2017 Share Posted December 2, 2017 1 hour ago, WTF_ said: شكراااااااااااا لك والله نفعتني عفواً , بالتوفيق لك : ) 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