Difference between revisions of "SendServerCommand"
From WolfWiki
m (fixes) |
m (style chance) |
||
Line 5: | Line 5: | ||
==Prining== | ==Prining== | ||
===Print=== | ===Print=== | ||
− | :"'''print''' \"''Message''\n\"" | + | : * "'''print''' \"''Message''\n\"" |
:'''print''' prints ''Message'' to the client's console. | :'''print''' prints ''Message'' to the client's console. | ||
===Center Print MoO=== | ===Center Print MoO=== | ||
− | :"'''cpm''' \"''Message''\n\""<br> | + | : * "'''cpm''' \"''Message''\n\""<br> |
:'''cpm''' prints ''Message'' to the client's annoucement area and console. | :'''cpm''' prints ''Message'' to the client's annoucement area and console. | ||
Line 17: | Line 17: | ||
===Scores Print=== | ===Scores Print=== | ||
− | :"'''sc''' \"''Message''\n\""<br> | + | : * "'''sc''' \"''Message''\n\""<br> |
:'''sc''' prints ''Message'' to the client's console and writes it to the statsdump file. | :'''sc''' prints ''Message'' to the client's console and writes it to the statsdump file. | ||
==Chatting== | ==Chatting== | ||
===Chat=== | ===Chat=== | ||
− | :"'''c''' ''ClientNum'' \"''Message''\""<br> | + | : * "'''c''' ''ClientNum'' \"''Message''\""<br> |
:'''c''' prints ''Message'' as a global chat message on behalf of client ''ClientNum''. | :'''c''' prints ''Message'' as a global chat message on behalf of client ''ClientNum''. | ||
===Team Chat=== | ===Team Chat=== | ||
− | :"'''tc''' ''ClientNum'' \"''Message''\" ''X-Location'' ''Y-Location'' ''Z-Location''"<br> | + | : * "'''tc''' ''ClientNum'' \"''Message''\" ''X-Location'' ''Y-Location'' ''Z-Location''"<br> |
:'''tc''' prints ''Message'' as a team chat message on behalf of client ''ClientNum'',<br> | :'''tc''' prints ''Message'' as a team chat message on behalf of client ''ClientNum'',<br> | ||
:the ''X,Y,Z-Location's'' are optional parematers that represent the client's location,<br> | :the ''X,Y,Z-Location's'' are optional parematers that represent the client's location,<br> | ||
Line 32: | Line 32: | ||
===Fireteam Chat=== | ===Fireteam Chat=== | ||
− | :"'''bc''' ''ClientNum'' \"''Message''\" ''X-Location'' ''Y-Location'' ''Z-Location''".<br> | + | : * "'''bc''' ''ClientNum'' \"''Message''\" ''X-Location'' ''Y-Location'' ''Z-Location''".<br> |
:'''bc''' prints ''Message'' as a fireteam chat message on behalf of client ''ClientNum'',<br> | :'''bc''' prints ''Message'' as a fireteam chat message on behalf of client ''ClientNum'',<br> | ||
:the ''X,Y,Z-Location's'' are parematers that represent the client's location. | :the ''X,Y,Z-Location's'' are parematers that represent the client's location. | ||
Line 38: | Line 38: | ||
==Voice Chat== | ==Voice Chat== | ||
===Global Voice Chat=== | ===Global Voice Chat=== | ||
− | :"'''vchat''' 0 ''ClientNum'' 50 ''Vsay-String'' ''Vsay-Number'' \"''Custom-Message''\"".<br> | + | : * "'''vchat''' 0 ''ClientNum'' 50 ''Vsay-String'' ''Vsay-Number'' \"''Custom-Message''\"".<br> |
:'''vchat''' sends a global voice chat ''Vsay-String'' on behalf of client ''ClientNum''.<br> | :'''vchat''' sends a global voice chat ''Vsay-String'' on behalf of client ''ClientNum''.<br> | ||
:''Vsay-Number'' is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <''Vsay-Number''> <''Vsay-String''>),<br> ''Vsay-Number'' represents the vsay number of Vsay as listed in the .voice files.<br> | :''Vsay-Number'' is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <''Vsay-Number''> <''Vsay-String''>),<br> ''Vsay-Number'' represents the vsay number of Vsay as listed in the .voice files.<br> | ||
Line 44: | Line 44: | ||
===Team Voice Chat=== | ===Team Voice Chat=== | ||
− | :"'''vtchat''' 0 ''ClientNum'' 50 ''Vsay-String'' ''Vsay-Number'' ''Y-Location'' ''Z-Location'' \"''Custom-Message''\""<br> | + | : * "'''vtchat''' 0 ''ClientNum'' 50 ''Vsay-String'' ''Vsay-Number'' ''Y-Location'' ''Z-Location'' \"''Custom-Message''\""<br> |
:'''vchat''' sends a team voice chat ''Vsay-String'' a on behalf of client ''ClienNtum''.<br> | :'''vchat''' sends a team voice chat ''Vsay-String'' a on behalf of client ''ClienNtum''.<br> | ||
:''Vsay-Number'' is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <''Vsay-Number''> <''Vsay-String''>),<br> ''Vsay-Number'' represents the vsay number of Vsay as listed in the .voice files.<br> | :''Vsay-Number'' is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <''Vsay-Number''> <''Vsay-String''>),<br> ''Vsay-Number'' represents the vsay number of Vsay as listed in the .voice files.<br> | ||
Line 51: | Line 51: | ||
===Fireteam Voice Chat=== | ===Fireteam Voice Chat=== | ||
− | :"'''vtchat''' 0 ''ClientNum'' 50 ''Fireteam-String'' ''Vsay-Number'' ''Y-Location'' ''Z-Location'' \"''Custom-Message''\""<br> | + | : * "'''vtchat''' 0 ''ClientNum'' 50 ''Fireteam-String'' ''Vsay-Number'' ''Y-Location'' ''Z-Location'' \"''Custom-Message''\""<br> |
:'''vchat''' will team voice chat ''Vsay-String'' on behalf of client ''ClienNum''.<br> | :'''vchat''' will team voice chat ''Vsay-String'' on behalf of client ''ClienNum''.<br> | ||
:''Vsay-Number'' is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <''Vsay-Number''> <''Vsay-String''>),<br> ''Vsay-Number'' represents the vsay number of Vsay as listed in the .voice files.<br> | :''Vsay-Number'' is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <''Vsay-Number''> <''Vsay-String''>),<br> ''Vsay-Number'' represents the vsay number of Vsay as listed in the .voice files.<br> | ||
Line 59: | Line 59: | ||
==Fireteam== | ==Fireteam== | ||
===Application=== | ===Application=== | ||
− | :"'''application''' ''Number''" | + | : * "'''application''' ''Number''" |
:'''application''' shows a fireteam invation message to the client.<br> | :'''application''' shows a fireteam invation message to the client.<br> | ||
:if ''Number'' > -1 - the "accept ... application to join your fireteam" message shows up. In this case ''Number'' is the ClientNum of the applying client.<br> | :if ''Number'' > -1 - the "accept ... application to join your fireteam" message shows up. In this case ''Number'' is the ClientNum of the applying client.<br> | ||
Line 68: | Line 68: | ||
===Proposition=== | ===Proposition=== | ||
− | :"'''proposition''' ''Number'' ''Number2''" | + | : * "'''proposition''' ''Number'' ''Number2''" |
:'''proposition''' shows a fireteam proposition message to the client.<br> | :'''proposition''' shows a fireteam proposition message to the client.<br> | ||
:if ''Number'' > -1 - the "accept ... proposition to invite ... to your fireteam" message shows up. In this case ''Number'' is the ClientNum of the proposed client, and ''Number2'' is the ClientNum of the proposing player.<br> | :if ''Number'' > -1 - the "accept ... proposition to invite ... to your fireteam" message shows up. In this case ''Number'' is the ClientNum of the proposed client, and ''Number2'' is the ClientNum of the proposing player.<br> | ||
Line 78: | Line 78: | ||
===Invitation=== | ===Invitation=== | ||
− | :"'''invitation''' ''Number''" | + | : * "'''invitation''' ''Number''" |
:'''invitation''' shows the fireteam invation message to the client.<br> | :'''invitation''' shows the fireteam invation message to the client.<br> | ||
:if ''Number'' > -1 - the "accept .. invitation to join your fireteam" message shows up. In this case ''Number'' is the ClientNum of the applying client.<br> | :if ''Number'' > -1 - the "accept .. invitation to join your fireteam" message shows up. In this case ''Number'' is the ClientNum of the applying client.<br> | ||
Line 88: | Line 88: | ||
==Others== | ==Others== | ||
===Complaining=== | ===Complaining=== | ||
− | :"'''complaint''' ''Number''"<br> | + | : * "'''complaint''' ''Number''"<br> |
:'''complaint''' shows the complaint vote message to the client.<br> | :'''complaint''' shows the complaint vote message to the client.<br> | ||
:if ''Number'' > 1 - the vote shows up. In this case ''Number'' is the ClientNum of the teamkilling player.<br> | :if ''Number'' > 1 - the vote shows up. In this case ''Number'' is the ClientNum of the teamkilling player.<br> | ||
Line 95: | Line 95: | ||
===Spawning=== | ===Spawning=== | ||
− | :"'''setspawnpt''' ''Number''"<br> | + | : * "'''setspawnpt''' ''Number''"<br> |
:"'''setspawnpt''' sets the client game selected spawnpoint to number ''number''. | :"'''setspawnpt''' sets the client game selected spawnpoint to number ''number''. |
Revision as of 18:07, 25 November 2005
et.trap_SendServerCommand() is used to send a command from the server to one or more clients. The first argument is the slot number of the client the command will be sent to. If it's equal to -1, the command will be broadcasted to all clients.
The following commands can be issued with this function:
Contents
Prining
- * "print \"Message\n\""
- print prints Message to the client's console.
Center Print MoO
- * "cpm \"Message\n\""
- cpm prints Message to the client's annoucement area and console.
Center Print
- "cp \"Message\n\""
- cp prints Message to the center of the client's screen.
Scores Print
- * "sc \"Message\n\""
- sc prints Message to the client's console and writes it to the statsdump file.
Chatting
Chat
- * "c ClientNum \"Message\""
- c prints Message as a global chat message on behalf of client ClientNum.
Team Chat
- * "tc ClientNum \"Message\" X-Location Y-Location Z-Location"
- tc prints Message as a team chat message on behalf of client ClientNum,
- the X,Y,Z-Location's are optional parematers that represent the client's location,
- if the X,Y,Z-Location's are left out then the message will be printed without a location.
Fireteam Chat
- * "bc ClientNum \"Message\" X-Location Y-Location Z-Location".
- bc prints Message as a fireteam chat message on behalf of client ClientNum,
- the X,Y,Z-Location's are parematers that represent the client's location.
Voice Chat
Global Voice Chat
- * "vchat 0 ClientNum 50 Vsay-String Vsay-Number \"Custom-Message\"".
- vchat sends a global voice chat Vsay-String on behalf of client ClientNum.
- Vsay-Number is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <Vsay-Number> <Vsay-String>),
Vsay-Number represents the vsay number of Vsay as listed in the .voice files. - Custom-Message is by default \"\" (empty), otherwise it's the message that gets printed in the chat area.
Team Voice Chat
- * "vtchat 0 ClientNum 50 Vsay-String Vsay-Number Y-Location Z-Location \"Custom-Message\""
- vchat sends a team voice chat Vsay-String a on behalf of client ClienNtum.
- Vsay-Number is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <Vsay-Number> <Vsay-String>),
Vsay-Number represents the vsay number of Vsay as listed in the .voice files. - the X,Y,Z-Location's parematers the represent the clients location.
- Custom-Message is by default \"\" (empty), otherwise it's the message that gets printed in the chat area.
Fireteam Voice Chat
- * "vtchat 0 ClientNum 50 Fireteam-String Vsay-Number Y-Location Z-Location \"Custom-Message\""
- vchat will team voice chat Vsay-String on behalf of client ClienNum.
- Vsay-Number is by default random, however, it can be set by the player by passing parameters to the vsay command (/vsay <Vsay-Number> <Vsay-String>),
Vsay-Number represents the vsay number of Vsay as listed in the .voice files. - the X,Y,Z-Location's parematers the represent the clients location.
- Custom-Message is by default \"\" (empty), otherwise it's the message that gets printed in the chat area.
Fireteam
Application
- * "application Number"
- application shows a fireteam invation message to the client.
- if Number > -1 - the "accept ... application to join your fireteam" message shows up. In this case Number is the ClientNum of the applying client.
- if Number == -1 - the "your aplication has been submitted" message shows up.
- if Number == -2 - the "your aplication failed" message shows up.
- if Number == -3 - the "your aplication has been approved" message shows up.
- if Number == -4 - the "your aplication reply has been sent" message shows up.
Proposition
- * "proposition Number Number2"
- proposition shows a fireteam proposition message to the client.
- if Number > -1 - the "accept ... proposition to invite ... to your fireteam" message shows up. In this case Number is the ClientNum of the proposed client, and Number2 is the ClientNum of the proposing player.
- if Number == -1 - the "your proposition has been submitted" message shows up.
- if Number == -2 - the "your proposition was rejected" message shows up.
- if Number == -3 - the "your proposition was accepted" message shows up.
- if Number == -4 - the "your proposition reply has been sent" message shows up.
- Number2 is an optional paramater only used when Number > -1.
Invitation
- * "invitation Number"
- invitation shows the fireteam invation message to the client.
- if Number > -1 - the "accept .. invitation to join your fireteam" message shows up. In this case Number is the ClientNum of the applying client.
- if Number == -1 - the "your invitation has been submitted" message shows up.
- if Number == -2 - the "your invitation rejected" message shows up.
- if Number == -3 - the "your invitation was accepted" message shows up.
- if Number == -4 - the "your invitation reply has been sent" message shows up.
Others
Complaining
- * "complaint Number"
- complaint shows the complaint vote message to the client.
- if Number > 1 - the vote shows up. In this case Number is the ClientNum of the teamkilling player.
- if Number == -1 - the "complaint filed" message shows up.
- if Number == -2 - the "complaint dismissed" message shows up.
Spawning
- * "setspawnpt Number"
- "setspawnpt sets the client game selected spawnpoint to number number.