Mr.CoR Posted January 7, 2016 Share Posted January 7, 2016 سلام عليكم شحوالكم طبعا انا شغال على مود شوب الأسلحة المهم سويت ترايقر من الكلاينت للسيرفر triggerServerEvent ("WeaponsShop:BuyWeapon", localPlayer, guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 2 ) , guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 4 ) , guiGridListGetItemData ( GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 5 ) ) وإستقبلته في السيرفر / addEvent("WeaponsShop:BuyWeapon", true) addEventHandler("WeaponsShop:BuyWeapon", root, function (id , price , Ammo) if ( getPlayerMoney ( source ) >= tonumber ( price ) ) then takePlayerMoney ( source, tonumber ( price ) ) giveWeapon ( source, id , Ammo ) outputChatBox( "#FFFF00* [ WeaponsShop ] :#ffffff You Have Buy " .. getWeaponNameFromID .. , source , 255 , 0 , 0 , true ) else outputChatBox ("#FFFF00* [ WeaponsShop ] :#FFFFFF You Don't Have" .. price .. "$" , source , 255 , 0 , 0 true) end end ) وجاني في الدي بق سكربت هذي المشاكل [2016-01-08 01:58:51] ERROR: Loading script failed: WeaponShop_v1\Server.lua:7: unexpected symbol near ',' [2016-01-08 01:58:58] ERROR: Client (6ArH*#FFFF00#_Mr,[C]oR) triggered serverside event WeaponsShop:BuyWeapon, but event is not added serverside ياريت واحد يساعدني بسرعه Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 addEvent("WeaponsShop:BuyWeapon", true) addEventHandler("WeaponsShop:BuyWeapon", root, function (id , price , Ammo) if ( getPlayerMoney ( source ) >= tonumber ( price ) ) then takePlayerMoney ( source, tonumber ( price ) ) giveWeapon ( source, id , Ammo ) outputChatBox( "#FFFF00* [ WeaponsShop ] :#ffffff You Have Buy " ..getWeaponNameFromID(id).."", source , 255 , 0 , 0 , true ) else outputChatBox ("#FFFF00* [ WeaponsShop ] :#FFFFFF You Don't Have" .. price .. "$" , source , 255 , 0 , 0 true) end end ) جـرب ! Link to comment
Mr.CoR Posted January 7, 2016 Author Share Posted January 7, 2016 [2016-01-08 02:13:10] ERROR: WeaponShop_v1\Server.lua:4: attempt to compare nil with number Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 addEvent("WeaponsShop:BuyWeapon", true) addEventHandler("WeaponsShop:BuyWeapon", root, function (id , price , Ammo) if ( tonumber ( price ) ) then if ( getPlayerMoney ( source ) >= tonumber ( price ) ) then takePlayerMoney ( source, tonumber ( price ) ) giveWeapon ( source, id , Ammo ) outputChatBox( "#FFFF00* [ WeaponsShop ] :#ffffff You Have Buy " ..getWeaponNameFromID(id).."", source , 255 , 0 , 0 , true ) else outputChatBox ("#FFFF00* [ WeaponsShop ] :#FFFFFF You Don't Have" .. price .. "$" , source , 255 , 0 , 0 true) end end end ) Link to comment
Mr.CoR Posted January 7, 2016 Author Share Posted January 7, 2016 لحظة انا حليت المشكلة خلاص واشتغل كل شي بالسيرفر بس واجهت مشكلة ثانية دقايق بس بحاول احلها Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 Take Your Time , My Friend <3 Link to comment
Mr.CoR Posted January 7, 2016 Author Share Posted January 7, 2016 (edited) ---------------------------- Edited January 8, 2016 by Guest Link to comment
' A F . Posted January 7, 2016 Share Posted January 7, 2016 أنت عندك خطا بـ الترايقر انت حاط الكولمن خطأ حاط الداتا حق الصور مو حق الايدي ضض ملخبط بـ Colmuns Link to comment
Mr.CoR Posted January 7, 2016 Author Share Posted January 7, 2016 بالضبط توي حال المشكلة بس في مشكلة ثانية صارت دقيقة بشوف ايش الهرجة حياتي كلها مشاكل يابن الحلال عههههههه Link to comment
Mr.CoR Posted January 7, 2016 Author Share Posted January 7, 2016 طيب ابيه يوم يشتري السلاح يطلع في يده مباشره وعلى ال hud كيف ؟ Link to comment
justboy Posted January 8, 2016 Share Posted January 8, 2016 giveWeapon(source, id , Ammo , true) Link to comment
Mr.CoR Posted January 8, 2016 Author Share Posted January 8, 2016 giveWeapon(source, id , Ammo , true) شكرا يا بعدي 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