Raised This Month: $32 Target: $400
 8% 

Undefined Symbol


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AuricYoutube
Senior Member
Join Date: Aug 2016
Location: Here
Old 08-23-2018 , 14:11   Undefined Symbol
Reply With Quote #1

I have been trying to edit this plugin I found on an older thread to make it run CS_TerminateRound instead of slaying the bot, but every time I try to compile it says error 017: undefined symbol "CS_TerminateRound"

Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    HookEvent("player_death", Event_PlayerDeath);
}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if (!IsFakeClient(client) && AllHumansDead())
    {
        SlayBots();
    }
}

bool:AllHumansDead()
{
    new bool:result = true;
    
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)) // Thanks Black-Rabbit
        {
            result = false;
        }
    }
    
    return result;
}

SlayBots()
{
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && IsFakeClient(i) && IsPlayerAlive(i))
        {
            CS_TerminateRound(GetConVarFloat(FindConVar("mp_round_restart_delay")), CSRoundEnd_CTWin)(i);
        }
    }
}
I am probably doing something very stupid but idk anything about scripting so xd

This is the original

Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    HookEvent("player_death", Event_PlayerDeath);
}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if (!IsFakeClient(client) && AllHumansDead())
    {
        SlayBots();
    }
}

bool:AllHumansDead()
{
    new bool:result = true;
    
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)) // Thanks Black-Rabbit
        {
            result = false;
        }
    }
    
    return result;
}

SlayBots()
{
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && IsFakeClient(i) && IsPlayerAlive(i))
        {
            ForcePlayerSuicide(i);
        }
    }
}

Last edited by AuricYoutube; 08-23-2018 at 14:12.
AuricYoutube is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 08-23-2018 , 14:24   Re: Undefined Symbol
Reply With Quote #2

Add:

#include <cstrike>
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
AuricYoutube
Senior Member
Join Date: Aug 2016
Location: Here
Old 08-23-2018 , 14:30   Re: Undefined Symbol
Reply With Quote #3

Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <cstrike>

public OnPluginStart()
{
    HookEvent("player_death", Event_PlayerDeath);
}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if (!IsFakeClient(client) && AllHumansDead())
    {
        SlayBots();
    }
}

bool:AllHumansDead()
{
    new bool:result = true;
    
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)) // Thanks Black-Rabbit
        {
            result = false;
        }
    }
    
    return result;
}

SlayBots()
{
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && IsFakeClient(i) && IsPlayerAlive(i))
        {
            CS_TerminateRound(GetConVarFloat(FindConVar("mp_round_restart_delay")), CSRoundEnd_CTWin)(i);
        }
    }
}
now the error is error 001: expected token ";", but found "(" (line 41)

Last edited by AuricYoutube; 08-23-2018 at 14:40. Reason: line specification
AuricYoutube is offline
AuricYoutube
Senior Member
Join Date: Aug 2016
Location: Here
Old 08-23-2018 , 15:41   Re: Undefined Symbol
Reply With Quote #4

Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <cstrike>

public OnPluginStart()
{
    HookEvent("player_death", Event_PlayerDeath);
}

public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
    if (!IsFakeClient(client) && AllHumansDead())
    {
        SlayBots();
    }
}

bool:AllHumansDead()
{
    new bool:result = true;
    
    for (new i = 1; i <= MaxClients; i++)
    {
        if (IsClientInGame(i) && !IsFakeClient(i) && IsPlayerAlive(i)) // Thanks Black-Rabbit
        {
            result = false;
        }
    }
    
    return result;
}

SlayBots()
{
	CS_TerminateRound(GetConVarFloat(FindConVar("mp_round_restart_delay")), CSRoundEnd_CTWin);
}
Fixed, btw I am a retard

If you want it here it is attached
Attached Files
File Type: sp Get Plugin or Get Source (endround-whenalldead.sp - 354 views - 829 Bytes)
AuricYoutube is offline
Reply


Thread Tools
Display Modes

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 11:00.


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