Guest Posted June 22, 2018 Share Posted June 22, 2018 (edited) Guys i wan't to add this text : #ff0000(#FF0040Shoutall#ff0000) Before this getPlayerName(player).." Here is the code: local name = getPlayerName(thePlayer) outputChatBox(getPlayerName(player).."#ffffff"..message.."", root, 255, 255, 255, true) Edited June 22, 2018 by Guest Link to comment
Moderators Patrick Posted June 22, 2018 Moderators Share Posted June 22, 2018 outputChatBox("#ff0000(#FF0040Shoutall#ff0000)"..getPlayerName(player).."#ffffff"..message.."", root, 255, 255, 255, true) Link to comment
Guest Posted June 22, 2018 Share Posted June 22, 2018 Damn i tried that but nothing happened, maybe i wroted it with wrong brother please i wan't to change this code textItem = textCreateTextItem ( message, 0.5, 0.5, 2, 205, 0, 0, 255, 3, "center", "center" ) To this one dxDrawText(getPlayerName(player)..", message", 204, 36, 816, 557, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "top", false, true, false, false, false) But not working Here is the full code function shout ( player, cmd, ... ) local accountname = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then local message = table.concat ( { ... }," " ) local name = getPlayerName(thePlayer) textDisplay = textCreateDisplay ( ) dxDrawText(getPlayerName(player)..", message", 204, 36, 816, 557, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "top", false, true, false, false, false) textDisplayAddText ( textDisplay, textItem ) for _, thePlayer in ipairs ( getElementsByType ( "player" ) ) do textDisplayAddObserver ( textDisplay, thePlayer ) end setTimer ( function ( ) textDestroyTextItem ( textItem ) textDestroyDisplay ( textDisplay ) end ,10000, 1 ) outputChatBox("#ff0000(#FF0040Shoutall#ff0000)"..getPlayerName(player)..": #ffffff"..message.."", root, 255, 255, 255, true) else outputChatBox ( "You cannot use this command!", player, 255, 12, 15 ) end end addCommandHandler ( "shoutall", shout ) Link to comment
MIKI785 Posted June 22, 2018 Share Posted June 22, 2018 You're mixing client and server side functions... you have to use triggerClientEvent in this case. Link to comment
Guest Posted June 22, 2018 Share Posted June 22, 2018 But i'm begginer idk how can you help? Link to comment
Moderators Patrick Posted June 22, 2018 Moderators Share Posted June 22, 2018 You want to shout text to all player screen? Link to comment
Guest Posted June 22, 2018 Share Posted June 22, 2018 Yeah, and my name appears on the screen Font: bankgothic Like Hyper2: Welcome everyone Link to comment
Moderators Patrick Posted June 22, 2018 Moderators Share Posted June 22, 2018 1 minute ago, Hyper2 said: Yeah, and my name appears on the screen Font: bankgothic Like Hyper2: Welcome everyone I gonna make it, and send it to you. (Max 30 mins, I have a little business to do, before it.) Link to comment
Guest Posted June 22, 2018 Share Posted June 22, 2018 Okay bro thanks very much To understand more like this https://imgur.com/a/Rc5h3kW Link to comment
Moderators Patrick Posted June 22, 2018 Moderators Share Posted June 22, 2018 Here it is. Sorry for late answer. Link: https://community.multitheftauto.com/?p=resources&s=details&id=15525 Link to comment
Guest Posted June 22, 2018 Share Posted June 22, 2018 Thanks you very much but please remove it from community Link to comment
Moderators Patrick Posted June 22, 2018 Moderators Share Posted June 22, 2018 2 minutes ago, Hyper2 said: Thanks you very much but please remove it from community Sorry bro, but we are a community.. So this script is for everyone. Link to comment
Guest Posted June 22, 2018 Share Posted June 22, 2018 Dude how to add wordwrap?? i changed this dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", ) To this dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", false, true, false, false, false) But nothing happened Link to comment
Moderators Patrick Posted June 22, 2018 Moderators Share Posted June 22, 2018 7 minutes ago, Hyper2 said: Dude how to add wordwrap?? i changed this dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", ) To this dxDrawText(shoutText, screenX/2, screenY/4, screenX/2, screenY/4, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "center", false, true, false, false, false) But nothing happened dxDrawText(shoutText, screenX/4, screenY/4, screenX/4*3, screenY/4*3, tocolor(220, 20, 20, 220), 2, "bankgothic", "center", "top", false, true) 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