MitnickP56 Posted September 15, 2015 Posted September 15, 2015 Hi, can someone tell me what is wrong and show me how complete it ? addCommandHandler("sg", function(sourcePlayer, command, value) setGameSpeed(tonumber(value)) outputChatBox('GameSpeed = '... (tonumber(value))...' . ' , 0, 240, 0 ) end ) Server-side.
HUNGRY:3 Posted September 15, 2015 Posted September 15, 2015 addCommandHandler("sg", function(sourcePlayer, command, value) setGameSpeed(tonumber(value)) outputChatBox('GameSpeed = '.. tonumber(value)..' . ' ,sourcePlayer, 0, 240, 0 ) end )
MitnickP56 Posted September 15, 2015 Author Posted September 15, 2015 addCommandHandler("sg", function(sourcePlayer, command, value) setGameSpeed(tonumber(value)) outputChatBox('GameSpeed = '.. tonumber(value)..' . ' ,sourcePlayer, 0, 240, 0 ) end ) Working Thanks.
n3wage Posted September 15, 2015 Posted September 15, 2015 You forgot the visibleTo argument on the outputChatBox function, See the Syntax: Server: bool outputChatBox ( string text [, element visibleTo=getRootElement(), int r=231, int g=217, int b=176, bool colorCoded=false ] ) Client: bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) As you can see there's a difference between the client and the server syntax, this probably was your problem.
MitnickP56 Posted September 15, 2015 Author Posted September 15, 2015 How edit it: 1. outputChatBox see only this gay, who using /sg All players must see in on chat. And I wanna add here GameSpeed = tnumer by ..Nick..
HUNGRY:3 Posted September 15, 2015 Posted September 15, 2015 How edit it: 1. outputChatBox see only this gay, who using /sg All players must see in on chat. And I wanna add here GameSpeed = tnumer by ..Nick.. this gay addCommandHandler("sg", function(sourcePlayer, command, value) setGameSpeed(tonumber(value)) outputChatBox('GameSpeed = '.. tonumber(value)..' by ' .. getPlayerName(sourcePlayer),root, 0, 240, 0 ) end )
MitnickP56 Posted September 15, 2015 Author Posted September 15, 2015 How edit it: 1. outputChatBox see only this gay, who using /sg All players must see in on chat. And I wanna add here GameSpeed = tnumer by ..Nick.. this gay addCommandHandler("sg", function(sourcePlayer, command, value) setGameSpeed(tonumber(value)) outputChatBox('GameSpeed = '.. tonumber(value)..' by ' .. getPlayerName(sourcePlayer),root, 0, 240, 0 ) end ) Really Thanks, all working :]
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