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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fjlep
Junior Member
Join Date: Apr 2024
Old 05-05-2024 , 20:57   Re: error 017: undefined symbol
Reply With Quote #3

Quote:
Originally Posted by bigdaddy424 View Post
https://www.diffchecker.com/g8mRSQO2/
PHP Code:
#include <amxmodx>
#include <engine>
#include <amxconst>
#include <cstrike_const>

#define PLUGIN_VERSION "1.0"
#define PLUGIN_NAME "Warmup Knife Round"
#define MUSIC_FILE "your_music_file.mp3"
#define WARMUP_TIME 60
#define MAX_SPEED 500.0

new const g_szMusic[] = MUSIC_FILE;
new 
Float:g_fRoundStartTime;
new 
g_bWarmupActive false;

public 
plugin_init() {
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSION"Author");

    
register_event("HLTV""Event_HLTV""b");
    
register_event("player_connect""Event_PlayerConnect""b");
    
register_event("round_start""Event_RoundStart""b");
    
register_event("round_end""Event_RoundEnd""b");
}

public 
Event_PlayerConnect(id) {
    if (
get_user_team(id) != 0) {
        
check_start_warmup();
    }
}

public 
check_start_warmup() {
    new 
teamCTPlayers 0;
    new 
teamTPlayers 0;

    for (new 
1<= get_maxplayers(); i++) {
        if (
is_user_connected(i) && !is_user_bot(i)) {
            if (
get_user_team(i) == _:CS_TEAM_CT) {
                
teamCTPlayers++;
            } else if (
get_user_team(i) == _:CS_TEAM_T) {
                
teamTPlayers++;
            }
        }
    }

    if (
teamCTPlayers && teamTPlayers && !g_bWarmupActive) {
        
start_warmup_round();
    }
}

public 
start_warmup_round() {
    
set_cvar_string("mp_roundtime"fmt("%d"WARMUP_TIME));
    
set_cvar_string("mp_freezetime""0");
    
set_cvar_string("mp_round_restart_delay""10");

    
set_cvar_float("sv_maxspeed"MAX_SPEED);

    
play_music();

    
server_cmd("sv_restartround 1");

    
g_fRoundStartTime get_gametime();
    
g_bWarmupActive true;
}

public 
play_music() {
    new 
szCommand[256];
    
formatex(szCommandsizeof(szCommand), "mp3 play %s"g_szMusic);
    
server_cmd(szCommand);
}

public 
Event_HLTV() {
    
server_cmd("mp3 stop");
}

public 
Event_RoundStart() {
    
show_activity();
}

public 
Event_RoundEnd() {
    
show_activity(0);

    for (new 
03i++) {
        
server_cmd("sv_restartround 1");
    }

    
g_bWarmupActive false;
}

stock show_activity(active 1) {
    if (
active && g_bWarmupActive) {
        new 
Float:timeRemaining WARMUP_TIME - (get_gametime() - g_fRoundStartTime);
        
show_activity_text("Time Remaining: %d"timeRemaining);
    } else {
        
show_activity_text("");
    }
}

public 
show_activity_text(const msg[], any:...) {
    new 
sBuffer[128];
    
vformat(sBuffersizeof(sBuffer), msg2);
    
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _0);
    
write_byte(1);
    
write_byte(255);
    
write_byte(255);
    
write_byte(255);
    
write_string(sBuffer);
    
message_end();

Thank you =D
fjlep is offline
 



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 02:38.


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