Jump to content

تعديل


Adham

Recommended Posts

سلام عليكم

مسوي لما

يضعط علي زر يجي في الشات لكل الناس

جائزه عشوائيه :

في جدول

وم اشتغلو ارجو التعديل ..

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

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

الكود هذا لين يخش السرفر واسمه اقل من 4 حروف

م يقدر يخش السرفر

addEventHandler ( "onPlayerConnect",root,
function ( )
       if ( getPlayerName ( source ) > 4 ) then
       cancelEvent( true, "ضع اكتر من 4 حروف" )
    end
end )

 

م اشتغل

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...