franku Posted June 6, 2017 Share Posted June 6, 2017 رمضان كريم وصيام مقبوا شباب. عندي هاذ الود, ما مشكله بس م يشتغل كيف مفروض انا بدي حين م اكتب كزماند nif يدخل اللاعب الي كتبها ب table اسمه infectedTable و اريد حين ادخل كومند sho يظهرلي اسماء كل اللعبين الي تبكو الكوماند "nif" addCommandHandler ( "nif", function( player ) local theVehicle = getPedOccupiedVehicle ( player ) if ( theVehicle ) then setVehicleColor( theVehicle, 255, 255, 0 ) end end ) function onInfection( player ) if ( onCarHit() ) then if ( infectedTeam ) then setPlayerTeam ( player, infectedTeam ) local playerNameInf = getPlayerName( player ) if ( playerNameInf ) then table.insert ( infectedTable.infections, playerNameInf ) end end end end addCommandHandler( 'sho', function( ) for v, infecteds in pairs ( infectedTable.infections ) do outputChatBox ( 'Infected Players:' .. tostring( infecteds ), player ) end end) ارجو المساعده شباب. شباب كمان طلب, كيف ممكن اخد اسم اللاعب الي خبط سيارتي واعمله كيك؟ او اغيرله لون سيارته؟ سلام شباب Link to comment
yasin0 Posted June 6, 2017 Share Posted June 6, 2017 (edited) طلبك الاول استعمل حدث "onPlayerCommand" الثاني getPlayerName "onVehicleDamage" kickPlayer or setVehicleColor Edited June 6, 2017 by yasin0 Link to comment
franku Posted June 6, 2017 Author Share Posted June 6, 2017 كيف ادخلهم ف تيبل واظهرهم بoutputchatbox? Link to comment
^iiEcoo'x_) Posted June 6, 2017 Share Posted June 6, 2017 getElementsByType -- loop getPlayerTable -- useful function tapl getPlayerName outputChatBox 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