apple700 Posted August 31, 2013 Share Posted August 31, 2013 السلام عليكم اخواني عندي مشكلة بمود ارسال الفلوس والله اني ثقلت عليكم بس معليش استحمولني شوي هذا الكود addEvent("GiveMoney", true) addEventHandler("GiveMoney",root, function(hassan, amount) local money = getPlayerMoney(source) local tohassan = getPlayerFromName(hassan) if tonumber(amount) <= money then givePlayerMoney(tohassan, amount) takePlayerMoney(source, amount) exports.killmessages:outputMessage("* You have given money amount of: " .. amount .. " : " .. hassan, source, 0, 150, 255, true) exports.killmessages:outputMessage("* ".. getPlayerName(source) .. " given you money amount of: $" .. amount .. " ", tohassan, 255, 0, 0, true) else exports.killmessages:outputMessage("* Error !",source, 255, 0, 0) end end ) مشكلته يوم واحد يكتب -1000 تنقص عند المحدد من جريد لست وتزيد عنده عندي مشكلة ثانية ابي اسوي بمود ارسال الفلوس عامود ثاني يظهر الاسم بعامود الاول والعامود ثاني كم معه فلوس وابي اسوي تاب لاكن يوم افتح تاب ابيه على شكل صورة ان شاء الله فهمتوا علي Link to comment
./BlackBird# Posted August 31, 2013 Share Posted August 31, 2013 if tonumber(amount) > 0 and tonumber(amount) <= money then Link to comment
apple700 Posted August 31, 2013 Author Share Posted August 31, 2013 ما اشتغل انا سويته كذا addEvent("GiveMoney", true) addEventHandler("GiveMoney",root, function(hassan, amount) local money = getPlayerMoney(source) local tohassan = getPlayerFromName(hassan) if tonumber(amount) > 0 and tonumber(amount) <= money then givePlayerMoney(tohassan, amount) takePlayerMoney(source, amount) exports.killmessages:outputMessage("* You have given money amount of: " .. amount .. " : " .. hassan, source, 0, 150, 255, true) exports.killmessages:outputMessage("* ".. getPlayerName(source) .. " given you money amount of: $" .. amount .. " ", tohassan, 255, 0, 0, true) else exports.killmessages:outputMessage("* Error !",source, 255, 0, 0) end end ) Link to comment
PaiN^ Posted August 31, 2013 Share Posted August 31, 2013 جرب كذا : addEvent( "GiveMoney", true ) addEventHandler( "GiveMoney",root, function( hassan, amount ) local money = getPlayerMoney( source ) local tohassan = getPlayerFromName( hassan ) if tohassan then if tonumber( amount ) > 0 and tonumber( amount ) <= money then givePlayerMoney( tohassan, amount ) takePlayerMoney( source, amount ) exports.killmessages:outputMessage( "* You have given : " .. amount .. " to " .. hassan, source, 0, 150, 255, true ) exports.killmessages:outputMessage( "* " .. getPlayerName( source ) .. " has sent you : $ " .. amount, tohassan, 255, 0, 0, true ) else exports.killmessages:outputMessage( "* Error - Wrong/so much amount of money !", source, 255, 0, 0 ) end else exports.killmessages:outputMessage( "* Error - No player with the name ( " .. hassan .. " ) !", source, 255, 0, 0 ) end end ) killmessages أو في الـ debugscript وان ما اشتغل, شوف وش يقول في الـ Link to comment
apple700 Posted August 31, 2013 Author Share Posted August 31, 2013 لالالا خلاص تم مشكور والله انك كفو الغلط مني انا لخبط الكود بس ابي طلبي ثانب لاهنت ابي اسوي بمود ارسال الفلوس عامود ثاني يظهر الاسم بعامود الاول والعامود ثاني كم معه فلوس وابي اسوي تاب لاكن يوم افتح تاب ابيه على شكل صورة ان شاء الله فهمت علي Link to comment
PaiN^ Posted August 31, 2013 Share Posted August 31, 2013 أما العمود ومدري وش مافهمتك ذذ GUIEditor التاب سويه بالـ Link to comment
apple700 Posted August 31, 2013 Author Share Posted August 31, 2013 اخوي ما ابي تاب عادي ابي يوم اضغط على صورة يظهر تاب ثاني والعامود يعني سويت مثلا عامودين عامود رقم ١ وعامود رقم ٢ نحدد على الاعب في العامود الاول اسمه وفي ثاني فلوسه بس Link to comment
S4MuEL Posted September 1, 2013 Share Posted September 1, 2013 (edited) "onClientGUIClick" guiCreateTab guiCreateStaticImage guiCreateGridList guiGridListAddColumn guiGridListAddRow getElementsByType getPlayerMoney getPlayerName addEventHandler addEvent triggerServerEvent Edited September 1, 2013 by Guest Link to comment
TAPL Posted September 1, 2013 Share Posted September 1, 2013 "onClientGUIClick" guiCreateTab guiCreateStaticImage guiCreateGridList guiGridListAddColumn guiGridListAddRow getElementsByType getPlayerMoney getPlayerName addEventHandler getPlayerMoney هذا ما راح يضبط بالكلينت int getPlayerMoney ( ) Returns an integer with the amount of money the local player has. Link to comment
S4MuEL Posted September 1, 2013 Share Posted September 1, 2013 "onClientGUIClick" guiCreateTab guiCreateStaticImage guiCreateGridList guiGridListAddColumn guiGridListAddRow getElementsByType getPlayerMoney getPlayerName addEventHandler getPlayerMoney هذا ما راح يضبط بالكلينت int getPlayerMoney ( ) Returns an integer with the amount of money the local player has. triggerServerEvent 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