Raised This Month: $51 Target: $400
 12% 

Server Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nexius
New Member
Join Date: Apr 2005
Old 10-27-2005 , 15:40   Server Plugin
Reply With Quote #1

Ok im writing a server plugin and im going to have to learn from trying things out.

I need to get started and im wondering how i would create a command
where foresay i type mx_version and it will display the version on of the plugin

is this what i would do

Code:
CON_COMMAND( empty_version, "prints the version of the empty plugin" )
{
	Msg( "Version:1.0.0.0\n" );
}

CON_COMMAND( empty_log, "logs the version of the empty plugin" )
{
	engine->LogPrint( "Version:1.0.0.0\n" );
}

//---------------------------------------------------------------------------------
// Purpose: an example cvar
//---------------------------------------------------------------------------------
static ConVar empty_cvar("plugin_empty", "0", 0, "Example plugin cvar");
i dont know though :S
nexius is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 10-27-2005 , 16:13  
Reply With Quote #2

Yes, change that to match your plugin:
Code:
CON_COMMAND( mx_version, "prints the version of the MX plugin" )
{
   Msg( "Version:1.0.0.0\n" );
}

CON_COMMAND( mx_log, "logs the version of the MX plugin" )
{
   engine->LogPrint( "Version:1.0.0.0\n" );
}
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
nexius
New Member
Join Date: Apr 2005
Old 10-27-2005 , 16:17  
Reply With Quote #3

wuts this line 4

static ConVar empty_cvar("plugin_empty", "0", 0, "Example plugin cvar");

And also i typed mx_version in console and it game me a unknown command, i used rcon mx_version and nothing happened
how does this work cuz its not :S

I uploaded it to my addons folder, along with serverplugin_empty.vdf which
contained
"Plugin"
{
"file" "../cstrike/addons/serverplugin_empty"
}


what do i do i just want it to pint the version in console
nexius is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode