JKiller55 Posted April 15, 2019 Share Posted April 15, 2019 function sayglobal (player,_,msg) if getElementData(player,"LoggedIn") == true then --muted einfg for i,d in ipairs(getElementsByType("player"))do if getElementData(d,"LoggedIn") == true then outputChatBox("#F0E68C[Global]".."#FFFFFF"..getPlayerName(player)..": "..msg,d,255,255,255,true) dbSetStat(getPlayerName(source),"ChatSays",dbGetStat(getPlayerName(source),"ChatSays")+1) end end end end addCommandHandler("g",sayglobal) addCommandHandler("Global",sayglobal) i need help here. when someone chat it only show the first word of the text a person wrote. so if i do "/g hey i am JKiller55" the script will show "[Global]JKi: hey" Link to comment
Dimos7 Posted April 15, 2019 Share Posted April 15, 2019 (edited) function sayglobal (player,_,... ) local msg = table.concat({...}, " ") if getElementData(player,"LoggedIn") == true then for i, d in pairs(getElementsByType("player")) do if getElementData(d,"LoggedIn") == true then outputChatBox("#F0E68C[Global]".."#FFFFFF"..getPlayerName(player)..": "..msg, d,255,255,255,true) dbSetStat(getPlayerName(source),"ChatSays",dbGetStat(getPlayerName(source),"ChatSays")+1) end end end end addCommandHandler("g",sayglobal) addCommandHandler("Global",sayglobal) Edited April 15, 2019 by Dimos7 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