#Soking Posted February 8, 2016 Share Posted February 8, 2016 function LogIn( ) if getElementData(source,'SsSS') then setElementData(source,'SsSS',0) end end addEventHandler("onPlayerLogin",getRootElement(),LogIn) addEventHandler ( "onResourceStart", getRootElement(), LogIn ) الفكره : لو سجل او المود اشتغل لو ما كان معاه الداتا يعطيه الداتا بس برضو مازبط جرب اعكس الشرط باستخدام not مازبط ثاني طلب addEventHandler ( "onClientGUIClick", root, function () if ( source == Give ) then local wc = guiGridListGetItemText(StatsPlayers, guiGridListGetSelectedItem(StatsPlayers), 1) local wc = getPlayerFromName(guiGridListGetItemText(StatsPlayers,guiGridListGetSelectedItem(StatsPlayers),1)) local name = getPlayerName(wc) local GiveJ = guiGetText(editbox) if ( tonumber ( GiveJ ) ) then setElementData(wc, "Jewelers", getElementData(wc, "Jewelers") + tonumber(GiveJ)) exports["guimessages"]:outputClient("[ #00FF00"..name.."#EC1818 ] ", 0, 225, 225 ) end end end ) الفكره زي يرسل فلوس بس يرسل داتا فهميني بس للاسف مايرسل Link to comment
Jupi Posted February 8, 2016 Share Posted February 8, 2016 function LogIn() setElementData(source,'SsSS',0) end addEventHandler("onPlayerLogin", getRootElement(), LogIn) function StartResource() for Key, Value in ipairs(getElementsByType("player")) do setElementData(Value, "SsSS", 0) end end addEventHandler ("onResourceStart", getRootElement(), StartResource) اول كود جربه ^ Link to comment
#Soking Posted February 8, 2016 Author Share Posted February 8, 2016 كودك ماشتغل + انا ابيه لو ما معه الداتا يعطيه هو الداتا يا ضابل Link to comment
Jupi Posted February 8, 2016 Share Posted February 8, 2016 function LogIn() if getElementData(source, "SsSS") == false then setElementData(source,'SsSS',0) end end addEventHandler("onPlayerLogin", getRootElement(), LogIn) function StartResource() for Key, Value in ipairs(getElementsByType("player")) do if getElementData(source, "SsSS") == false then setElementData(Value, "SsSS", 0) end end end addEventHandler ("onResourceStart", getRootElement(), StartResource) الكود شغال و مجربه بنفسي و هذا التعديل لو الداتا مو معه و اسمي دابل Link to comment
#Soking Posted February 8, 2016 Author Share Posted February 8, 2016 سؤال false مو دي المفروض القيمة ؟ Link to comment
!#NssoR_) Posted February 8, 2016 Share Posted February 8, 2016 function LogIn() if getElementData(source, "SsSS") == false then setElementData(source,'SsSS',0) end end addEventHandler("onPlayerLogin", getRootElement(), LogIn) function StartResource() for Key, Value in ipairs(getElementsByType("player")) do if getElementData(source, "SsSS") == false then setElementData(Value, "SsSS", 0) end end end addEventHandler ("onResourceStart", getRootElement(), StartResource) الكود شغال و مجربه بنفسي و هذا التعديل لو الداتا مو معه و اسمي دابل عندك خطأ في سطر 10 + جرب addEventHandler ( "onClientGUIClick", root, function () if ( source == Give ) then local row,Column = guiGridListGetSelectedItem(StatsPlayers) if ( row ~= -1 ) and ( Column ~= -1 ) then local wc = getPlayerFromName(guiGridListGetItemText(StatsPlayers, row, Column)) and local name = getPlayerName(wc) local GiveJ = guiGetText(editbox) if ( GiveJ ~= '' and tonumber ( GiveJ ) ) then setElementData(wc, "Jewelers", getElementData(wc, "Jewelers") + tonumber(GiveJ)) exports["guimessages"]:outputClient("[ #00FF00"..name.."#EC1818 ] ", 0, 225, 225 ) end end end end ) Link to comment
Jupi Posted February 8, 2016 Share Posted February 8, 2016 function LogIn() if getElementData(source, "SsSS") == false then setElementData(source,'SsSS',0) end end addEventHandler("onPlayerLogin", getRootElement(), LogIn) function StartResource() for Key, Value in ipairs(getElementsByType("player")) do if getElementData(source, "SsSS") == false then setElementData(Value, "SsSS", 0) end end end addEventHandler ("onResourceStart", getRootElement(), StartResource) الكود شغال و مجربه بنفسي و هذا التعديل لو الداتا مو معه و اسمي دابل عندك خطأ في سطر 10 + جرب addEventHandler ( "onClientGUIClick", root, function () if ( source == Give ) then local row,Column = guiGridListGetSelectedItem(StatsPlayers) if ( row ~= -1 ) and ( Column ~= -1 ) then local wc = getPlayerFromName(guiGridListGetItemText(StatsPlayers, row, Column)) and local name = getPlayerName(wc) local GiveJ = guiGetText(editbox) if ( GiveJ ~= '' and tonumber ( GiveJ ) ) then setElementData(wc, "Jewelers", getElementData(wc, "Jewelers") + tonumber(GiveJ)) exports["guimessages"]:outputClient("[ #00FF00"..name.."#EC1818 ] ", 0, 225, 225 ) end end end end ) اعذرني علي خطئي ما لاحظته Link to comment
#Soking Posted February 8, 2016 Author Share Posted February 8, 2016 مشكورين اول كود زبط لاكن الثاني جاني خطاء بالدي بوق حاولت اصلحه ماعرفت نهائيا ERROR: Loading script failed: System\client.lua:375: unexpected symbol near 'local' 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