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

[DR] plugin errors in server console


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
denisdeathrun
Member
Join Date: Apr 2020
Old 04-16-2020 , 15:41   [DR] plugin errors in server console
Reply With Quote #1

Hello, on majority of deathrun servers it's a plugin that respawns you in first 30 seconds in every round. Mine is bad xD

PHP Code:
 L 04/16/2020 21:49:11: Function is not present (function "TimeCounter") (plugin "respawn.dr.amxx")
L 04/16/2020 21:49:11: [AMXXRun time error 10 (plugin "respawn.dr.amxx") (native "set_task") - debug not enabled!
L 04/16/2020 21:49:11: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes).
L 04/16/2020 21:54:56: [mapchooser.amxxVoteVoting for the nextmap started 
I added debug, but still got errors

can somebody give me a good respawn plugin?

Last edited by denisdeathrun; 04-16-2020 at 15:41.
denisdeathrun is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 04-16-2020 , 15:44   Re: [DR] plugin errors in server console
Reply With Quote #2

Send the plugin ( .sma )
alferd is offline
denisdeathrun
Member
Join Date: Apr 2020
Old 04-16-2020 , 15:48   Re: [DR] plugin errors in server console
Reply With Quote #3

here

Spoiler

Last edited by denisdeathrun; 04-16-2020 at 15:48.
denisdeathrun is offline
denisdeathrun
Member
Join Date: Apr 2020
Old 04-16-2020 , 16:17   Re: [DR] plugin errors in server console
Reply With Quote #4

any help?
denisdeathrun is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 04-17-2020 , 01:03   Re: [DR] plugin errors in server console
Reply With Quote #5

try this

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter  

new g_SyncRestartTimer
new g_SyncGameStart

new Float:RoundStartTime

new g_Time_Interval;

new 
g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1];
new 
g_pCvarRespawnTimeg_pCvarRespawnDelay;

public 
plugin_init()
{
    
register_plugin("Dr.Respawn""1.1""Vicious Vixen"); 
    
RegisterHam(Ham_Killed"player""fwdPlayerKilledPost"1);
    
RegisterHam(Ham_Spawn"player""fwdPlayerSpawnPost"1);
    
register_event("TeamInfo""eTeamInfo""a");
    
register_logevent"LogEventRoundStart"2"1=Round_Start" )
    
g_pCvarRespawnTime register_cvar("amx_respawn_tickets""0"); //Set to 0 for unlimited respawns
    
g_pCvarRespawnDelay register_cvar("amx_respawn_delay""1"); // Delay to respawn
    
g_Time_Interval register_cvar("amx_max_time""30"); // Time Left to respawn
    
set_msg_blockget_user_msgid"ClCorpse" ), BLOCK_SET );
    
    
g_SyncRestartTimer CreateHudSyncObj()
    
g_SyncGameStart CreateHudSyncObj()
    
}

public 
LogEventRoundStart()
{
    
RoundStartTime get_gametime()
    
    new 
iPlayers[32]
    new 
iNum
    
    get_players
iPlayersiNum )
    
    for( new 
0iNumi++ )
    {
        
g_iRespawn[iPlayers[i]] = true
    
}
    
set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval))
    
set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123)
}

public 
Runda_Terminata()
{
    if(
RoundStartTime)
    {
        
set_hudmessage255000.090.0010.51.00.515.0, -1)
        
ShowSyncHudMsg0g_SyncGameStart"Respawn plugin is disabled!")
    }
}

public 
fwdPlayerKilledPost(iVictimiKilleriShoudlGib)
{
    if(
g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
    {
        
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer"iVictim);
    }
    return 
HAM_IGNORED;
}

public 
taskRespawnPlayer(id)
{
    if(
is_user_connected(id) && RoundStartTime get_pcvar_num(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
        
g_iRespawn[id] = false
        
return PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;
}  

public 
eTeamInfo() 

    new 
iClient read_data(1);
    new 
szTeam[2];
    
read_data(2szTeamcharsmax(szTeam));
    switch(
szTeam[0])
    {
        case 
'T'
        {
            if(
g_TeamInfoCounter[iClient] == || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
            {
                
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
            }
            
g_iPlayerTeam[iClient] = CS_TEAM_T;
        }
        case 
'C'
        {
            if(
g_TeamInfoCounter[iClient] == || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
            {
                
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
            }
            
g_iPlayerTeam[iClient] = CS_TEAM_CT;
        }
        case 
'S':
        {
            
remove_task(iClient);
            
g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR;
        }
    }
}

public 
TimeCounter() 
{
    
g_counter++
    
    new 
Float:iRestartTime get_pcvar_float(g_Time_Interval) - g_counter
    
new Float:fSec
    fSec 
iRestartTime 
    
    set_hudmessage
255000.090.010.01.00.00.0, -1)
    
ShowSyncHudMsg0g_SyncRestartTimer"Remaining %d seconds of respawn "floatround(fSec))
    
    if(
get_pcvar_num(g_Time_Interval) - g_counter 11 && get_pcvar_num(g_Time_Interval) - g_counter !=0)
    {
        static 
szNum[32]
        
num_to_word(get_pcvar_num(g_Time_Interval) - g_counterszNum31)
    }
    if(
g_counter == get_pcvar_num(g_Time_Interval))
    {
        
g_counter 0
    
}

Code:
AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Header size:           1100 bytes
Code size:             4612 bytes
Data size:             2016 bytes
Stack/heap size:      16384 bytes
Estimated usage:        188 bytes
Total requirements:   24112 bytes
__________________
SED LYF !!!

Last edited by SHIELD755; 04-17-2020 at 01:04.
SHIELD755 is offline
denisdeathrun
Member
Join Date: Apr 2020
Old 04-17-2020 , 05:11   Re: [DR] plugin errors in server console
Reply With Quote #6

Errors
PHP Code:
// by the AMX Mod X Dev Team


//// dr.respawn.sma
// C:\Users\Claudiu\Desktop\tot desktopul\New folder\addons\amxmodx\scripting\dr.respawn.sma(15) : error 017: undefined symbol "MAX_PLAYERS"
// C:\Users\Claudiu\Desktop\tot desktopul\New folder\addons\amxmodx\scripting\dr.respawn.sma(15) : error 009: invalid array size (negative or zero)
//
// 2 Errors.
// Could not locate output file C:\Users\Claudiu\Desktop\tot desktopul\New folder\addons\amxmodx\scripting\compiled\dr.respawn.amx (compile failed).
//
// Compilation Time: 0.16 sec
// ----------------------------------------

Press enter to exit ... 
denisdeathrun is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 04-17-2020 , 05:39   Re: [DR] plugin errors in server console
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>

new g_counter  

new g_SyncRestartTimer
new g_SyncGameStart

new Float:RoundStartTime

new g_Time_Interval;

#define MAX_PLAYERS 32

new g_iRespawn[MAX_PLAYERS+1], g_TeamInfoCounter[MAX_PLAYERS+1], CsTeams:g_iPlayerTeam[MAX_PLAYERS+1];
new 
g_pCvarRespawnTimeg_pCvarRespawnDelay;

public 
plugin_init()
{
    
register_plugin("Dr.Respawn""1.1""Vicious Vixen"); 
    
RegisterHam(Ham_Killed"player""fwdPlayerKilledPost"1);
    
RegisterHam(Ham_Spawn"player""fwdPlayerSpawnPost"1);
    
register_event("TeamInfo""eTeamInfo""a");
    
register_logevent"LogEventRoundStart"2"1=Round_Start" )
    
g_pCvarRespawnTime register_cvar("amx_respawn_tickets""0"); //Set to 0 for unlimited respawns
    
g_pCvarRespawnDelay register_cvar("amx_respawn_delay""1"); // Delay to respawn
    
g_Time_Interval register_cvar("amx_max_time""30"); // Time Left to respawn
    
set_msg_blockget_user_msgid"ClCorpse" ), BLOCK_SET );
    
    
g_SyncRestartTimer CreateHudSyncObj()
    
g_SyncGameStart CreateHudSyncObj()
    
}

public 
LogEventRoundStart()
{
    
RoundStartTime get_gametime()
    
    new 
iPlayers[32]
    new 
iNum
    
    get_players
iPlayersiNum )
    
    for( new 
0iNumi++ )
    {
        
g_iRespawn[iPlayers[i]] = true
    
}
    
set_task(1.0,"TimeCounter",123456,_,_,"a",get_pcvar_num(g_Time_Interval))
    
set_task(get_pcvar_float(g_Time_Interval),"Runda_Terminata",789123)
}

public 
Runda_Terminata()
{
    if(
RoundStartTime)
    {
        
set_hudmessage255000.090.0010.51.00.515.0, -1)
        
ShowSyncHudMsg0g_SyncGameStart"Respawn plugin is disabled!")
    }
}

public 
fwdPlayerKilledPost(iVictimiKilleriShoudlGib)
{
    if(
g_iRespawn[iVictim]++ < get_pcvar_num(g_pCvarRespawnTime) || get_pcvar_num(g_pCvarRespawnTime) == 0)
    {
        
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer"iVictim);
    }
    return 
HAM_IGNORED;
}

public 
taskRespawnPlayer(id)
{
    if(
is_user_connected(id) && RoundStartTime get_pcvar_num(g_Time_Interval) >= get_gametime() && g_iRespawn[id] && !is_user_alive(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR) {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
        
g_iRespawn[id] = false
        
return PLUGIN_HANDLED;
    }
    return 
PLUGIN_HANDLED;
}  

public 
eTeamInfo() 

    new 
iClient read_data(1);
    new 
szTeam[2];
    
read_data(2szTeamcharsmax(szTeam));
    switch(
szTeam[0])
    {
        case 
'T'
        {
            if(
g_TeamInfoCounter[iClient] == || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
            {
                
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
            }
            
g_iPlayerTeam[iClient] = CS_TEAM_T;
        }
        case 
'C'
        {
            if(
g_TeamInfoCounter[iClient] == || g_iPlayerTeam[iClient] == CS_TEAM_SPECTATOR)
            {
                
set_task(get_pcvar_float(g_pCvarRespawnDelay), "taskRespawnPlayer",  iClient);
            }
            
g_iPlayerTeam[iClient] = CS_TEAM_CT;
        }
        case 
'S':
        {
            
remove_task(iClient);
            
g_iPlayerTeam[iClient] = CS_TEAM_SPECTATOR;
        }
    }
}

public 
TimeCounter() 
{
    
g_counter++
    
    new 
Float:iRestartTime get_pcvar_float(g_Time_Interval) - g_counter
    
new Float:fSec
    fSec 
iRestartTime 
    
    set_hudmessage
255000.090.010.01.00.00.0, -1)
    
ShowSyncHudMsg0g_SyncRestartTimer"Remaining %d seconds of respawn "floatround(fSec))
    
    if(
get_pcvar_num(g_Time_Interval) - g_counter 11 && get_pcvar_num(g_Time_Interval) - g_counter !=0)
    {
        static 
szNum[32]
        
num_to_word(get_pcvar_num(g_Time_Interval) - g_counterszNum31)
    }
    if(
g_counter == get_pcvar_num(g_Time_Interval))
    {
        
g_counter 0
    
}

alferd is offline
denisdeathrun
Member
Join Date: Apr 2020
Old 04-17-2020 , 05:47   Re: [DR] plugin errors in server console
Reply With Quote #8

thanks !
denisdeathrun is offline
denisdeathrun
Member
Join Date: Apr 2020
Old 04-17-2020 , 05:58   Re: [DR] plugin errors in server console
Reply With Quote #9

STILL GETTING ERRORS IN SERVER CONSOLE!!

PHP Code:
 L 04/17/2020 12:43:25: [AMXXRun time error 10 (plugin "respawn.dr.amxx") (native "get_pcvar_num") - debug not enabled!
L 04/17/2020 12:43:25: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes). 
denisdeathrun is offline
denisdeathrun
Member
Join Date: Apr 2020
Old 04-17-2020 , 06:00   Re: [DR] plugin errors in server console
Reply With Quote #10

I've added debug
PHP Code:
L 04/17/2020 12:50:18: [AMXXDisplaying debug trace (plugin "respawn.dr.amxx")
L 04/17/2020 12:50:18: [AMXXRun time error 10native error (native "get_pcvar_num")
L 04/17/2020 12:50:18: [AMXX] [0respawn.dr.sma::fwdPlayerKilledPost (line 65
denisdeathrun 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 07:11.


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