Raised This Month: $51 Target: $400
 12% 

[CSTRIKE] Player out of RANGE (0)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
deprale
Senior Member
Join Date: Oct 2018
Location: Leeds
Old 01-04-2019 , 13:57   [CSTRIKE] Player out of RANGE (0)
Reply With Quote #1

What it is supposed to do: Basically it has to check every 5 seconds if someone joined a team and hasn't respawned yet. It's a small add-on for my pug plugin, basically respawn in warmup

PHP Code:
public client_connectid )
{
    
g_iFragsid ] = 0;
    
set_task(2.0"checkname"id);
    if(
mixon==0)
    {
        
set_task(1.0"warmup"___"b" );
        
set_task(5.0"checkdead"___"b"id);
    }
}

public 
checkdead(id)
{
    if(!
is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_CT || CS_TEAM_T) && mixon==0)
    {
    
set_task(0.5"respawn"id);
    }
    else if(!
is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_SPECTATOR))
    return 
HAM_IGNORED;
    else if(!
is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_UNASSIGNED))
    {
        return 
HAM_IGNORED;
    }
    return 
PLUGIN_CONTINUE;

Error code:
PHP Code:
L 01/04/2019 21:18:19: [CSTRIKEPlayer out of range (0)
L 01/04/2019 21:18:19: [AMXXRun time error 10 (plugin "evils-mix.amxx") (native "cs_get_user_team") - debug not enabled!
L 01/04/2019 21:18:19: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes).
L 01/04/2019 21:18:24: [CSTRIKEPlayer out of range (0)
L 01/04/2019 21:18:24: [AMXXRun time error 10 (plugin "evils-mix.amxx") (native "cs_get_user_team") - debug not enabled!
L 01/04/2019 21:18:24: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes).
L 01/04/2019 21:18:29: [CSTRIKEPlayer out of range (0)
L 01/04/2019 21:18:29: [AMXXRun time error 10 (plugin "evils-mix.amxx") (native "cs_get_user_team") - debug not enabled!
L 01/04/2019 21:18:29: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes).
L 01/04/2019 21:18:34: [CSTRIKEPlayer out of range (0)
L 01/04/2019 21:18:34: [AMXXRun time error 10 (plugin "evils-mix.amxx") (native "cs_get_user_team") - debug not enabled!
L 01/04/2019 21:18:34: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes).
L 01/04/2019 21:18:39: [CSTRIKEPlayer out of range (0)
L 01/04/2019 21:18:39: [AMXXRun time error 10 (plugin "evils-mix.amxx") (native "cs_get_user_team") - debug not enabled!
L 01/04/2019 21:18:39: [AMXXTo enable debug modeadd "debug" after the plugin name in plugins.ini (without quotes). 
It was working fine before I changed something... Don't know exactly what tbh.

Any help is appreciated, thanks!


EDIT: Nevermind I'm so god damn dumb, I even looked like an ape at this : https://www.amxmodx.org/api/amxmodx/set_task for about a solid 20 minutes and I completely ignored where the "id" should stand. Never make the same mistake, the issue was in
PHP Code:
set_task(5.0"checkdead"___"b"id); 
shoulda been
PHP Code:
set_task(5.0"checkdead"id__"b"); 
God DAMN! FACEPALM! Lesson learned

Last edited by deprale; 01-04-2019 at 14:32.
deprale 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 01:08.


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