mody134 Posted November 29, 2016 Share Posted November 29, 2016 معاية مود الكتابة على شاشة الاعبين بس عايز يظهر اسم الى كتب الرسالة فى الشات function shout(player, cmd, ...) local accountname = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "official" )) then for id, players in ipairs(getElementsByType("player")) do local message = table.concat({...}," ") local textDisplay = textCreateDisplay () local nombre = getPlayerName(player) local textItem = textCreateTextItem( ""..message, 0.5, 0.5, 2, 255, 255, 255, 255, 2, "center", "center" ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 2000, 1, textItem ) setTimer ( textDestroyDisplay, 2000, 1, textDisplay ) end else outputChatBox("You cannot use this command!",player,255,12,15) end end addCommandHandler("hi", shout) --Credits to SolidSnake14 for help. Link to comment
^iiEcoo'x_) Posted November 29, 2016 Share Posted November 29, 2016 outputChatBox ( "[" ..getPlayerName (player).." كتب ع الشاشة", root, 255, 140, 25 ) Link to comment
mody134 Posted November 29, 2016 Author Share Posted November 29, 2016 وين احط الكود ؟ Link to comment
iMr ~ MnHmAr Posted November 29, 2016 Share Posted November 29, 2016 (edited) Just now, mody134 said: وين احط الكود ؟ تحت سطر 10 Edited November 29, 2016 by iMr ~ MnHmAr Link to comment
Ahmed Ly Posted November 29, 2016 Share Posted November 29, 2016 function shout(player, cmd, ...) local accountname = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "official" )) then for id, players in ipairs(getElementsByType("player")) do local message = table.concat({...}," ") local textDisplay = textCreateDisplay () local nombre = getPlayerName(player) local textItem = textCreateTextItem(""..nombre..":"..message.."", 0.5, 0.5, 2, 255, 255, 255, 255, 2, "center", "center" ) textDisplayAddText ( textDisplay, textItem ) textDisplayAddObserver ( textDisplay, players ) setTimer ( textDestroyTextItem, 2000, 1, textItem ) setTimer ( textDestroyDisplay, 2000, 1, textDisplay ) end else outputChatBox("You cannot use this command!",player,255,12,15) end end addCommandHandler("hi", shout) 1 Link to comment
^iiEcoo'x_) Posted November 29, 2016 Share Posted November 29, 2016 هو قال بده الي كتب الرساله اسمه يجي بالشات 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