#Soking Posted March 31, 2016 Share Posted March 31, 2016 انا مسوي لوحة ارسال داتا بس المشكله ممكن واحد يسوي هيك -10000 تنسحب منه وهي ماههي معه اي شي و يعطيني ويصير بق , كيف امنع يحط رموز ؟ Link to comment
#Soking Posted March 31, 2016 Author Share Posted March 31, 2016 عساس انك بتفهم في شي انت كل موضوع تحط خرابيط و تهايط !@ Link to comment
ivor Posted March 31, 2016 Share Posted March 31, 2016 -_______________________- شايفني غلطت فيك ؟؟ احاول اساعدك واساعد امثالك لكن امثالك مايبون حدا الا الى ع مزاجهم روح روح شوف حدا تاني يساعدك Link to comment
iMr.WiFi..! Posted March 31, 2016 Share Posted March 31, 2016 جرب تحقق من منع الرموز مثلا if edit == '-' then return end Link to comment
taha201100 Posted March 31, 2016 Share Posted March 31, 2016 لو تتطرح الاكواد اشوف افضل مشان يقدر يساعدوك دب Link to comment
Abdul KariM Posted March 31, 2016 Share Posted March 31, 2016 تحقق من نوعه الي مكتوب بالايدت بـاستخدام type Link to comment
Abdul KariM Posted March 31, 2016 Share Posted March 31, 2016 if type( Money ) == "number" then -- ... end Link to comment
#Soking Posted March 31, 2016 Author Share Posted March 31, 2016 وليه حاطها بين استرينج " " ? Link to comment
justboy Posted March 31, 2016 Share Posted March 31, 2016 حول string to number tonumber(str) وتأكد ان الرقم فوق الصفر Link to comment
#Soking Posted March 31, 2016 Author Share Posted March 31, 2016 addEventHandler ("onClientGUIClick", sendMoney, function() local amount = guiGetText(moneyEdit) local Game = getPlayerFromName(guiGetText(Name)) if ( Game ~= localPlayer ) then if getElementData(localPlayer,'J') >= tonumber( amount ) then if type( amount ) == number then guiSetEnabled(sendMoney,false) triggerServerEvent('HiEto',localPlayer,Game,amount) else exports["guimessages"]:outputClient("") end else exports["guimessages"]:outputClient("") end end end,false) ماشتغل Link to comment
Abdul KariM Posted March 31, 2016 Share Posted March 31, 2016 addEventHandler ("onClientGUIClick", sendMoney, function() local amount = guiGetText(moneyEdit) local Game = getPlayerFromName(guiGetText(Name)) if ( Game ~= localPlayer ) then if getElementData(localPlayer,'J') >= tonumber( amount ) then if type( amount ) == number then guiSetEnabled(sendMoney,false) triggerServerEvent('HiEto',localPlayer,Game,amount) else exports["guimessages"]:outputClient("") end else exports["guimessages"]:outputClient("") end end end,false) ماشتغل وين سترنق سطر 7 كذا راح يصير بق , لازم تحدد التايب ويكون سترنق Link to comment
justboy Posted March 31, 2016 Share Posted March 31, 2016 if tonumber( amount ) and tonumber( amount ) > 0 then Link to comment
#Soking Posted March 31, 2016 Author Share Posted March 31, 2016 مايصلح الغي انه يستخدم اي علامات غير الارقام ؟ Link to comment
justboy Posted March 31, 2016 Share Posted March 31, 2016 يب جرب function newNumber(str) local text = '' for num = 0,#str do local number = str:sub(num,num) text = text..(tonumber(number) or '') end return text end addEventHandler('onClientGUIChanged',sendMoney, function() guiSetText(source,newNumber(guiGetText(sendMoney))) end ) Link to comment
#CroSs Posted March 31, 2016 Share Posted March 31, 2016 local Gsub = string["gsub"] addEventHandler( "onClientGUIChanged", resourceRoot, function() local Boolean = source == moneyEdit return ( Boolean or source == Name ) and guiSetText( source, Boolean and ( tonumber( Gsub( guiGetText( source ), "%D", "" ).."" ) or "" ) or Gsub( guiGetText( source ), "[^!\"#%$%%&\'%(%)%*%+,%-%./0123456789:;<=>%?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%[\\%]%^_`abcdefghijklmnopqrstuvwxyz{|}~]", "" ) ) end ) addEventHandler( "onClientGUIClick", sendMoney, function() local GuiMessages, Amount, Player = exports["guimessages"], tonumber( guiGetText( moneyEdit ) ), getPlayerFromName( guiGetText( Name ) ) local Boolean = Player and Player ~= localPlayer if ( Player and Amount and Boolean and getElementData( localPlayer, "J" ) >= Amount ) then triggerServerEvent( "HiEto", localPlayer, Player, Amount ) return GuiMessages:outputClient( "The Money Has Been Sent Successfully." ) end GuiMessages:outputClient( Player and ( Amount and ( Boolean and "You Don't Have Enough Money" or "You Can't Send To Youself." ) or "Invalid Amount." ) or "Player Not Found." ) end, false ) Link to comment
Jupi Posted March 31, 2016 Share Posted March 31, 2016 local Gsub = string["gsub"] addEventHandler( "onClientGUIChanged", resourceRoot, function() local Boolean = source == moneyEdit return ( Boolean or source == Name ) and guiSetText( source, Boolean and ( tonumber( Gsub( guiGetText( source ), "%D", "" ).."" ) or "" ) or Gsub( guiGetText( source ), "[^!\"#%$%%&\'%(%)%*%+,%-%./0123456789:;<=>%?@ABCDEFGHIJKLMNOPQRSTUVWXYZ%[\\%]%^_`abcdefghijklmnopqrstuvwxyz{|}~]", "" ) ) end ) addEventHandler( "onClientGUIClick", sendMoney, function() local GuiMessages, Amount, Player = exports["guimessages"], tonumber( guiGetText( moneyEdit ) ), getPlayerFromName( guiGetText( Name ) ) local Boolean = Player and Player ~= localPlayer if ( Player and Amount and Boolean and getElementData( localPlayer, "J" ) >= Amount ) then triggerServerEvent( "HiEto", localPlayer, Player, Amount ) return GuiMessages:outputClient( "The Money Has Been Sent Successfully." ) end GuiMessages:outputClient( Player and ( Amount and ( Boolean and "You Don't Have Enough Money" or "You Can't Send To Youself." ) or "Invalid Amount." ) or "Player Not Found." ) end, false ) هريسة احترافية : 3 Like. Link to comment
N3xT Posted March 31, 2016 Share Posted March 31, 2016 سوي جدول ، وحط فيه الأشكال اللي ما تبيها وسوي تحقق اذا كان فيه شيء من الجدول بالإديت يمنع الحدث Link to comment
#J2mes Posted April 1, 2016 Share Posted April 1, 2016 احسن لك انك تسوي مثل ماقالك لـك @JustBoy Link to comment
Jupi Posted April 1, 2016 Share Posted April 1, 2016 احسن لك انك تسوي مثل ماقالك لـك @JustBoy بلعكس كود كروس افضل Link to comment
#Soking Posted April 1, 2016 Author Share Posted April 1, 2016 كروس كود دا ولا حصة رسم , مافهمت شي Link to comment
#J2mes Posted April 1, 2016 Share Posted April 1, 2016 ماعليش صاحب الموضوع , بس بسئلكم تظبط string["sub"] ? Link to comment
Jupi Posted April 1, 2016 Share Posted April 1, 2016 ماعليش صاحب الموضوع , بس بسئلكم تظبط string["sub"] ? فيه متغير عام اسمه string هذا جواه جدول يحتوي فنكنشات متعلقة بstring منظره كذا مثلاً string = { ["sub"] = function () ... end } نحن استدعينا القيمة اللي هي الفنكشن و استعملناها مثل ما سوا كروس في كوده وفيه جداول لباقي الاشياء مثل table, math, debug, _G 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