AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TF2 Thirdperson Script Errors (https://forums.alliedmods.net/showthread.php?t=206371)

rtachet3789 01-21-2013 12:08

TF2 Thirdperson Script Errors
 
Hello,
I am a completely amateur coder only learning the basics for my friends server. I am having issues with this .sp script. It may be a small thing that I'm to new to understand or it could be a big problem. This is only the area that I am having problems with of the script

/home/groups/sourcemod/upload_tmp/phpmwpXoG.sp(560) : error 021: symbol already defined: "RegConsoleCmd"

1 Error.



Code:

public OnPluginStart()
{

        //Register:
        PrintToConsole(0, "[SM] TF2 Third Person by Joe Maley and edited by Carl, Bear and Wombat loaded successfully!", PLUGIN_VERSION);

        //Admin Commands:
        //RegAdminCmd("sm_forcetpv", CommandForce, ADMFLAG_CUSTOM1, "<0|1> - Forces third person view on all clients");
        //RegAdminCmd("sm_enabletpv", CommandEnable, ADMFLAG_CUSTOM1, "<0|1> - Enables or disables the usage of third person view");
        //RegAdminCmd("sm_thirdperson", CommandTPV, ADMFLAG_CUSTOM1, "<Name> - Toggles third person on a client");

        //Events:
        //HookEvent("player_spawn", EventSpawn);

        //Console Commands:
        //RegConsoleCmd("taunt", ToggleViaTaunt);

        //Server Variable:
        CreateConVar("tpvbase_version", "1.0", "TF2 Thirdperson Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
}
        RegConsoleCmd("cam_idealdistright 20", Command_Test);
}
 
public Action:Command_Test(client, args)
{
        new String:arg[128];
        new String:full[256];
 
        GetCmdArgString(full, sizeof(full));
 
        if (client)
        {
                PrintToServer("Command from client: %N");
        } else {
                PrintToServer("Well ideal dist right didnt work.");
        }
 
        PrintToServer("Argument string: %s", full);
        PrintToServer("Argument count: %d", args);
        for (new i=1; i<=args; i++)
        {
                GetCmdArg(i, arg, sizeof(arg));
                PrintToServer("Argument %d: %s", i, arg);

        }
        RegConsoleCmd("cam_idealdist 40", Command_Testicle);
}
public Action:Command_Testicle(client, args)
{
        new String:arg[128];
        new String:full[256];
 
        GetCmdArgString(full, sizeof(full));
 
        if (client)
        {
        PrintToServer("Command from client: %N");
        } else {
                PrintToServer("Well ideal dist didnt work.");
        }
 
        PrintToServer("Argument string: %s", full);
        PrintToServer("Argument count: %d", args);
        for (new i=1; i<=args; i++)
        {
                GetCmdArg(i, arg, sizeof(arg));
                PrintToServer("Argument %d: %s", i, arg);
        }
        RegConsoleCmd("cam_idealdistup -40", Command_Bear);
}
 
public Action:Command_Bear(client, args)
{
        new String:arg[128];
        new String:full[256];
 
        GetCmdArgString(full, sizeof(full));
 
        if (client)
        {
        PrintToServer("Command from client: %N");
        } else {
                PrintToServer("Well ideal dist up didnt work");
        }
 
        PrintToServer("Argument string: %s", full);
        PrintToServer("Argument count: %d", args);
        for (new i=1; i<=args; i++)
        {
                GetCmdArg(i, arg, sizeof(arg));
                PrintToServer("Argument %d: %s", i, arg);
        }
}

Thank you in advanced.

zEEDu 01-21-2013 12:38

Re: TF2 Thirdperson Script Errors
 
Wrong section...

Go to the SourcePawn Section

rtachet3789 01-21-2013 17:01

Re: TF2 Thirdperson Script Errors
 
Thank you


All times are GMT -4. The time now is 20:38.

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