View Single Post
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 02-08-2011 , 11:58   Re: some errors while compiling
Reply With Quote #2

Cleaned up your code:

PHP Code:
#define PLUGIN_VERSION "0.1"

#include <sourcemod>
public Plugin:myinfo =
{
    
name "Ben-Command",
    
author "Ben-Yaa",
    
description "Server commands manager",
    
version PLUGIN_VERSION,
    
url "http://www.RooT.co.il"
};

public 
OnPluginStart()
{
    
RegAdminCmd("sm_rr"Command_BCRADMFLAG_ROOT);

    
CreateConVar"sm_bcomm""1" );
    
CreateConVar"bcomm_version"PLUGIN_VERSION"CVAR Description here"FCVAR_PLUGIN FCVAR_SPONLY FCVAR_REPLICATED FCVAR_NOTIFY );
}

public 
Action:Command_BCR(clientargs)
{
    
ReplyToCommand(client"\x01[\x03Ben-Command\x01] \x03Admin \x04%N \x03has restarted the round!"client);
    return 
Plugin_Handled;

Just look at the difference between yours and mine lol.

ServerCommand("") executes a console command on the server.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline