Avir14 Posted August 15, 2023 Share Posted August 15, 2023 ممكن احد يشرحلي ماهو اللوب ابي اعرف كيف ادور في كل الي بالسيرفر عن اعلا شخص في شئ معين او داتا معينه مادري كيف الاقيها بالويكي Link to comment
#Soking Posted August 17, 2023 Share Posted August 17, 2023 for Key, Player in ipairs( getElementsByType ( 'player' ) ) do if ( getPlayerName( Player ) == 'Avir14' ) then outputChatBox( "Welcome", Player ) end end for Key, Player in ipairs( getElementsByType ( 'player' ) ) do if ( getElementData( Player, 'ID' ) == 5 ) then outputChatBox( "Welcome", Player ) end end 1 Link to comment
Avir14 Posted August 17, 2023 Author Share Posted August 17, 2023 1 hour ago, #Soking said: for Key, Player in ipairs( getElementsByType ( 'player' ) ) do if ( getPlayerName( Player ) == 'Avir14' ) then outputChatBox( "Welcome", Player ) end end for Key, Player in ipairs( getElementsByType ( 'player' ) ) do if ( getElementData( Player, 'ID' ) == 5 ) then outputChatBox( "Welcome", Player ) end end سؤال اعدرني كيف اجيب اعلا شخص معه ايدي فلسيرفر لما اسوي اللوب Link to comment
#Soking Posted August 17, 2023 Share Posted August 17, 2023 (edited) 36 minutes ago, Avir14 said: سؤال اعدرني كيف اجيب اعلا شخص معه ايدي فلسيرفر لما اسوي اللوب function getBigPlayer( ) local BigID, LastPlayer = 0 for _, Player in ipairs( getElementsByType( 'player' ) ) do local PlayerID = getElementData( Player, 'ID' ) or 0 if ( PlayerID and PlayerID > BigID ) then BigID, LastPlayer = PlayerID, Player end end return LastPlayer end -- Test local aPlayer = getBigPlayer( ) outputChatBox( aPlayer and getPlayerName( aPlayer ) or 'None' ) Edited August 17, 2023 by #Soking 1 Link to comment
ايهاب Posted August 23, 2023 Share Posted August 23, 2023 On 16/08/2023 at 23:34, #Soking said: function getBigPlayer( ) local BigID, LastPlayer = 0 for _, Player in ipairs( getElementsByType( 'player' ) ) do local PlayerID = getElementData( Player, 'ID' ) or 0 if ( PlayerID and PlayerID > BigID ) then BigID, LastPlayer = PlayerID, Player end end return LastPlayer end -- Test local aPlayer = getBigPlayer( ) outputChatBox( aPlayer and getPlayerName( aPlayer ) or 'None' ) اقتراح بس ضيف فنكيشن لما الحدث ينقل اللاعب warp لمكان اخر هو انا مش فاهم بقول اية بس بحاول اعمل نفسى مبرمج 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