First plugin ever!
Hello!
Well this is my first plugin ever. So I need some informations here, which I didn't find on the wiki. 1. How can I make the plugin print something in the MAIN console? (actual srcds.exe console) 2. How can I make it say something ingame? as "omg it is working", without the "console:" infront of it? - realchamp, any help is appreciated. |
Re: First plugin ever!
//to say to the server
PrintToServer(String:Message[], any formatting...); //to say to someone's chat PrintToChat(Client, String:Message[], any formatting...); |
Re: First plugin ever!
Another solution :)
PHP Code:
|
Re: First plugin ever!
@exvel: That would still put "Console: " in front of the text.
|
Re: First plugin ever!
oh, right, I've just missed it
|
Re: First plugin ever!
Quote:
And "client", do I have to a name there or just leave it? And when I run this: Code:
#include <sourcemod> |
Re: First plugin ever!
PHP Code:
|
Re: First plugin ever!
Thank you, it worked.
But how can I be sure the plugin is loaded? Even that I see the "LOADED" in my console. Isn't there a SourceMod command for this? And how can I send a message to all players on the server? With this: Code:
PrintToChat(Client, String:Message[], any formatting...); |
Re: First plugin ever!
Woops, sorry for not explaining.
PrintToChat(Client ID, String:Message, Formatting) Client ID: This is the number of the player it is printing to. I need more information on when this is being run to know how to get it. String:Message: This is the message in quotes... "hello" Formatting: This is for additional things, like variables. Leave it blank for now. So basically, to print to the first player in the server, do... PrintToChat(1, "hello"); To print to others, first tell me when it's being used. |
Re: First plugin ever!
ohh okay. Thanks!
Well let's say that if some one is killed. you were killed by $playername Or is it possible to send that command to all players? As instead of id = 1, what shall I use then to print that message to all people? like on round_start If round_start: Server running xxxxxx and that message must go to all players. Here I was improvising abit: Code:
#include <sourcemod> |
All times are GMT -4. The time now is 14:35. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.