Adham Posted February 15, 2017 Share Posted February 15, 2017 سلام عليكم مسوي لما يضعط علي زر يجي في الشات لكل الناس جائزه عشوائيه : في جدول وم اشتغلو ارجو التعديل .. addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor.button[5] ) then triggerServerEvent ( "RandomCompetition", localPlayer ) end end ) -- server local Competition = { {"تاق"}, {"rent"}, } addEvent ( "RandomCompetition", true ) addEventHandler ( "RandomCompetition", root, function ( ) exports.topbarchat:sendClientMessage(math.random(Competition),root,0,153,204,true) end ) Link to comment
Jupi Posted February 16, 2017 Share Posted February 16, 2017 Server Side : local Competition = { {"تاق"}, {"rent"}, } addEvent ( "RandomCompetition", true ) addEventHandler ( "RandomCompetition", root, function ( ) exports.topbarchat:sendClientMessage(Competition[math.random(1, #Competition)][1],root,0,153,204,true) end ) Link to comment
Jupi Posted February 16, 2017 Share Posted February 16, 2017 1 minute ago, Deativated said: مشكور اخوي عفواً : ) Link to comment
Adham Posted February 16, 2017 Author Share Posted February 16, 2017 الكود هذا لين يخش السرفر واسمه اقل من 4 حروف م يقدر يخش السرفر addEventHandler ( "onPlayerConnect",root, function ( ) if ( getPlayerName ( source ) > 4 ) then cancelEvent( true, "ضع اكتر من 4 حروف" ) end end ) م اشتغل Link to comment
!#NssoR_) Posted February 16, 2017 Share Posted February 16, 2017 (edited) يغلق بما ان المشكلة الاولي تم حلها ، ويرجي فتح موضوع جديد للمشكلة الجديده . Edited February 16, 2017 by !#NssoR_) Link to comment
Recommended Posts