coNolel Posted January 24, 2017 Share Posted January 24, 2017 أول مرة اشوف الناس تطلب غصب '~' يحاول يساعده بأقصى ما لديه بالأخير يكرشه 1 Link to comment
N3xT Posted January 24, 2017 Share Posted January 24, 2017 (edited) جرب التالي : فكود فتح اللوحة حط ذا الكود triggerServerEvent("load:Columns",localPlayer,localPlayer) كلينت addEventHandler ( "onClientGUIClick", root, function ( btn ) if source == GUIEditor.checkbox[1] then guiCheckBoxSetSelected ( GUIEditor.checkbox[2], not guiCheckBoxGetSelected ( source ) ) elseif source == GUIEditor.checkbox[2] then guiCheckBoxSetSelected ( GUIEditor.checkbox[1], not guiCheckBoxGetSelected ( source ) ) end if btn == "left" then if ( source == GUIEditor.button[1] ) then local item = guiComboBoxGetSelected ( com ) local card = guiComboBoxGetItemText(com, item) local name, email, number = guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), guiGetText ( GUIEditor.edit[3] ) if name == "" or number == "" or card == "" then return end if guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) then triggerServerEvent ( "RentSystem:onCreateNewOrder", localPlayer, localPlayer, name, email, number, card, "classic" ) elseif guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) then triggerServerEvent ( "RentSystem:onCreateNewOrder", localPlayer, localPlayer, name, email, number, card, "special" ) end guiSetEnabled ( GUIEditor.button[1], false ) end end end ) addEvent ( "RentSystem:onSendSubscribePlayers", true ) addEventHandler ( "RentSystem:onSendSubscribePlayers", root, function ( tables ) for i, v in ipairs( tables ) do local row = guiGridListAddRow ( GUIEditor.gridlist[4] ) guiGridListSetItemText( GUIEditor.gridlist[4], row, 2,tables[i].name, false, false) guiGridListSetItemText(GUIEditor.gridlist[4], row, 1, tables[i].serial , false, false) guiGridListSetItemText(GUIEditor.gridlist[4], row, 3, tables[i].card, false, false) end end ) سيرفر addEventHandler ("onResourceStart", resourceRoot, function () executeSQLQuery ("CREATE TABLE IF NOT EXISTS `Rent_system` (serial,name,email,number,card,plan)") end ) addEvent ( "load:Columns", true ) addEventHandler ( "load:Columns", root, function ( player ) local result = executeSQLQuery ( "SELECT * FROM `Rent_System` WHERE `serial` = ?", getPlayerSerial (player) ) if ( result and #result == 0 ) then return end triggerClientEvent ( player, "RentSystem:onSendSubscribePlayers", player, result ) end ) addEvent("RentSystem:onCreateNewOrder",true) addEventHandler("RentSystem:onCreateNewOrder",root, function ( player, name, email, number, card, plan ) local result = executeSQLQuery ( "SELECT * FROM `Rent_system` WHERE `serial` = ?", getPlayerSerial (player) ) if ( result and #result == 0 ) then executeSQLQuery( 'INSERT INTO `Rent_system` (serial,name,email,number,card,plan) VALUES(?,?,?,?,?,?) ', getPlayerSerial(player), getPlayerName(player), email, number, card, plan ) else outputChatBox("لديك طلب حالياً",player,255,255,255,true) end end ) Edited January 24, 2017 by N3xT Link to comment
Adham Posted January 25, 2017 Author Share Posted January 25, 2017 الكود فيه مشاكل لما بكتب في لايديت وكلو ويجي في القريد لست لما اضعط ف10 افتح الوحه يضيف الطلب تاني في القريد لست مدري كيف ض1 ولما ارستر المود او اطلع واخش م يتحفظ الطلب يروح . Link to comment
N3xT Posted January 25, 2017 Share Posted January 25, 2017 طيب شوف الديبوق لأن الكود ما جربته وأتمنى توضح الأخطاء كلها بالتفصيل + انت تبي الطلبات كلها تظهر ولا اللي انت مسويها فقط Link to comment
Adham Posted January 25, 2017 Author Share Posted January 25, 2017 تمام انا ظبتها ابي فكشنات لما يحدد سريال من قريد لست يتفعل له لوحه من حرف خ Link to comment
N3xT Posted January 25, 2017 Share Posted January 25, 2017 نفس الفنكشنات اللي فوق ، حاول تسويها بنفسك مب كل شيء علينا 2 Link to comment
Abu-Solo Posted January 26, 2017 Share Posted January 26, 2017 9 hours ago, Deativated 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