This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

error 017: undefined symbol


Post New Thread Reply   
 
Thread Tools Display Modes
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-10-2024 , 23:45   Re: error 017: undefined symbol
Reply With Quote #11

Quote:
Originally Posted by fjlep View Post
The function of the plugin is that in the first warm-up round it is with a knife and it is activated when there are 2 people (one on each side) at the beginning of the round everyone will have a speed with flash, the music also has to be present and I would like it to be able to be configured using an .ini file and to have the time displayed as a hud of how long that round is lasting and for it to be displayed at the top.
I'm currently working on this and planning on finishing it later today or at worst tomorrow.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-11-2024 , 12:01   Re: error 017: undefined symbol
Reply With Quote #12

The only thing i didn't add for now is the .ini file configuration. I'd like to know if the rest works as designed before adding that feature. I have no server setup to test this on so it'll be your task to share your feedback.

PHP Code:
#include <amxmodx>
#include <fun>
#include <fakemeta>

#define pluginName "Warm-up"
#define pluginVersion "1.0"
#define pluginAuthor "LadderGoat"

#if !defined MAX_PLAYERS
    #define MAX_PLAYERS 32
#endif

#pragma semicolon 1

new const soundPath[] = "sound/warmup/active.mp3";

new 
statusIcon;

new 
bool:warmupActive;
new 
bool:restartActive;

public 
plugin_init()
{
    
register_plugin(pluginNamepluginVersionpluginAuthor);

    
register_event("HLTV""catchNewRoundEvent""a""1=0""2=0");
    
register_event("TextMsg""catchRestartGameEvents""a""2&#Game_C""2&#Game_w");

    
register_logevent("roundStartEvent"2"1=Round_Start");

    
statusIcon get_user_msgid("StatusIcon");
    
register_message(statusIcon"blockBuyZone");
}

public 
plugin_precache()
{
    
precache_generic(soundPath);
}

public 
catchNewRoundEvent()
{
    if(
restartActive)
    {
        new 
tPlayers[MAX_PLAYERS], ctPlayers[MAX_PLAYERS], tCountctCount;
        
get_players(tPlayerstCount"e""TERRORIST");
        
get_players(ctPlayersctCount"e""CT");

        if(
tCount && ctCount)
        {
            
warmupActive true;
        }
        
restartActive false;
    }
}

public 
catchRestartGameEvents()
{
    
restartActive true;
}

public 
roundStartEvent()
{
    if(
warmupActive)
    {
        new 
allPlayers[MAX_PLAYERS], allPlayerCount;
        new 
playerID;

        
get_players(allPlayersallPlayerCount"a");

        for(new 
playerplayer allPlayerCountplayer++)
        {
            
playerID allPlayers[player];

            
strip_user_weapons(playerID);
            
give_item(playerID"weapon_knife");
            
give_item(playerID"weapon_flashbang");
            
set_user_maxspeed(playerIDget_user_maxspeed(playerID) + 150.0);
            
client_cmd(playerID"mp3 play %s"soundPath);
        }
    }
}

public 
blockBuyZone(messageIDmessageDestplayerID)
{
    if(
warmupActive)
    {
        static 
statusIcon[8];
        
get_msg_arg_string(2statusIconcharsmax(statusIcon));

        if(
equal(statusIcon"buyzone") && get_msg_arg_int(1))
        {
            
set_pdata_int(playerID235get_pdata_int(playerID235) & ~(<< 0));
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;

__________________

Last edited by Napoleon_be; 05-11-2024 at 12:01.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
fjlep
Junior Member
Join Date: Apr 2024
Old 05-12-2024 , 13:28   Re: error 017: undefined symbol
Reply With Quote #13

the plugin does not start the round with the speed, it only loads the message that loads the mp3

Quote:
Originally Posted by Napoleon_be View Post
The only thing i didn't add for now is the .ini file configuration. I'd like to know if the rest works as designed before adding that feature. I have no server setup to test this on so it'll be your task to share your feedback.

PHP Code:
#include <amxmodx>
#include <fun>
#include <fakemeta>

#define pluginName "Warm-up"
#define pluginVersion "1.0"
#define pluginAuthor "LadderGoat"

#if !defined MAX_PLAYERS
    #define MAX_PLAYERS 32
#endif

#pragma semicolon 1

new const soundPath[] = "sound/warmup/active.mp3";

new 
statusIcon;

new 
bool:warmupActive;
new 
bool:restartActive;

public 
plugin_init()
{
    
register_plugin(pluginNamepluginVersionpluginAuthor);

    
register_event("HLTV""catchNewRoundEvent""a""1=0""2=0");
    
register_event("TextMsg""catchRestartGameEvents""a""2&#Game_C""2&#Game_w");

    
register_logevent("roundStartEvent"2"1=Round_Start");

    
statusIcon get_user_msgid("StatusIcon");
    
register_message(statusIcon"blockBuyZone");
}

public 
plugin_precache()
{
    
precache_generic(soundPath);
}

public 
catchNewRoundEvent()
{
    if(
restartActive)
    {
        new 
tPlayers[MAX_PLAYERS], ctPlayers[MAX_PLAYERS], tCountctCount;
        
get_players(tPlayerstCount"e""TERRORIST");
        
get_players(ctPlayersctCount"e""CT");

        if(
tCount && ctCount)
        {
            
warmupActive true;
        }
        
restartActive false;
    }
}

public 
catchRestartGameEvents()
{
    
restartActive true;
}

public 
roundStartEvent()
{
    if(
warmupActive)
    {
        new 
allPlayers[MAX_PLAYERS], allPlayerCount;
        new 
playerID;

        
get_players(allPlayersallPlayerCount"a");

        for(new 
playerplayer allPlayerCountplayer++)
        {
            
playerID allPlayers[player];

            
strip_user_weapons(playerID);
            
give_item(playerID"weapon_knife");
            
give_item(playerID"weapon_flashbang");
            
set_user_maxspeed(playerIDget_user_maxspeed(playerID) + 150.0);
            
client_cmd(playerID"mp3 play %s"soundPath);
        }
    }
}

public 
blockBuyZone(messageIDmessageDestplayerID)
{
    if(
warmupActive)
    {
        static 
statusIcon[8];
        
get_msg_arg_string(2statusIconcharsmax(statusIcon));

        if(
equal(statusIcon"buyzone") && get_msg_arg_int(1))
        {
            
set_pdata_int(playerID235get_pdata_int(playerID235) & ~(<< 0));
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;

fjlep is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-14-2024 , 13:07   Re: error 017: undefined symbol
Reply With Quote #14

Quote:
Originally Posted by fjlep View Post
the plugin does not start the round with the speed, it only loads the message that loads the mp3
Is everything else besides the speed working?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
fjlep
Junior Member
Join Date: Apr 2024
Old 05-14-2024 , 18:45   Re: error 017: undefined symbol
Reply With Quote #15

Quote:
Originally Posted by Napoleon_be View Post
Is everything else besides the speed working?
only the music, I would like to know that the warmup counter is working.
fjlep 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 00:14.


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