root تستخدمها للربط بين الاشياء
Example for Client :
Button[1] = guiCreateButton ( ... )
Button[2] = guiCreateButton ( ... )
function Example ( )
if source == Button[1] then
-- Code
elseif source == Button[2] then
-- Code
end
end
addEventHandler ( 'onClientGUIClick', root, Example )
resourceRoot تستخدمها للربط بحدث خاص بـ سكربت إو المود حقك
Example for Client :
Window[1] = guiCreateWindow ( ..... )
Window[2] = guiCreateWindow ( ..... )
function Example ( )
guiSetVisible ( Window[1], true )
guiSetVisible ( Window[2], false )
outputChatBox ( 'Started Script Example Done.', 255, 255, 255, false )
end
function Example1 ( )
guiSetVisible ( Window[1], false )
guiSetVisible ( Window[2], false )
outputChatBox ( 'Stoped Script Example Done.', 255, 255, 255, false )
end
addEventHandler ( 'onClientResourceStart', resourceRoot, Example )
addEventHandler ( 'onClientResourceStop', resourceRoot, Example1 )
etc تستخدمها لجلب حدث إو فنكشن للشيء معين
etc = 'player' !
Example for Server :
Examples Down :
addEventHandler ( 'onPlayerJoin', root,
function ( plr ) -- يجب وضعها
outputChatBox ( 'New Player His Join Done.', 255, 255, 255, true )
giveWeapon ( plr, 5, 30 )
end
end
addEventHandler ( 'onPlayerJoin', root,
function ( client ) -- يجب وضعها
outputChatBox ( 'New Player His Join Done.', 255, 255, 255, true )
giveWeapon ( client, 5, 30 )
end
end
addEventHandler ( 'onPlayerJoin', root,
function ( thePlayer ) -- يجب وضعها
outputChatBox ( 'New Player His Join Done.', 255, 255, 255, true )
giveWeapon ( thePlayer, 5, 30 )
end
end
addEventHandler ( 'onPlayerJoin', root,
function ( player ) -- يجب وضعها
outputChatBox ( 'New Player His Join Done.', 255, 255, 255, true )
giveWeapon ( player, 5, 30 )
end
end
addEventHandler ( 'onPlayerJoin', root,
function ( ) -- لاتضع بين القوسين source / ولا سوف يكون السورس مخفي
outputChatBox ( 'New Player His Join Done.', 255, 255, 255, true )
giveWeapon ( source, 5, 30 )
end
end
! إي شيء لم تفهم ضعه برد التالي