Raised This Month: $ Target: $400
 0% 

invalid player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KamiN
Senior Member
Join Date: Jun 2011
Old 06-16-2012 , 20:59   invalid player
Reply With Quote #1

Code:
public beacon(id)
{
    
    if(cs_get_user_team(id) == CS_TEAM_CT)
    {
        if(is_user_alive(id))
        {
            static origin[3]
            get_user_origin(id, origin)
            message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
            write_byte(TE_BEAMCYLINDER)    // TE id
            write_coord(origin[0])         // x
            write_coord(origin[1])        // y
            write_coord(origin[2]-20)    // z
            write_coord(origin[0])        // x axis
            write_coord(origin[1])        // y axis
            write_coord(origin[2]+200)    // z axis
            write_short(beacon_sprite)    // sprite
            write_byte(0)            // startframe   
            write_byte(1)            // framerate   
            write_byte(6)            // life
            write_byte(2)              // width
            write_byte(1)               // noise    
            write_byte(0)              // red  
            write_byte(0)               // green 
            write_byte(250)         // blue
            write_byte(200)            // brightness
            write_byte(0)            // speed
            message_end()
        }
    }
    else
    {
        if(is_user_alive(id))
        {
            static origin[3]
            get_user_origin(id, origin)
            message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
            write_byte(TE_BEAMCYLINDER)    // TE id
            write_coord(origin[0])         // x
            write_coord(origin[1])        // y
            write_coord(origin[2]-20)    // z
            write_coord(origin[0])        // x axis
            write_coord(origin[1])        // y axis
            write_coord(origin[2]+200)    // z axis
            write_short(beacon_sprite)    // sprite
            write_byte(0)            // startframe   
            write_byte(1)            // framerate   
            write_byte(6)            // life
            write_byte(2)              // width
            write_byte(1)               // noise    
            write_byte(250)            // red  
            write_byte(0)               // green 
            write_byte(0)             // blue
            write_byte(200)            // brightness
            write_byte(0)            // speed
            message_end()
        }
    }

    set_task(1.0, "beacon", id)
        
}
Code:
L 06/17/2012 - 03:31:44: [CSTRIKE] Invalid player 1
L 06/17/2012 - 03:31:44: [AMXX] Displaying debug trace (plugin "jb_days_lr.amxx")
L 06/17/2012 - 03:31:44: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 06/17/2012 - 03:31:44: [AMXX]    [0] jb_days_lr.sma::beacon (line 706)
I saw this warning in logs, so i added to code that is_user_alive(id) thing, but even after that i have same problem. So how do i fix this?


this code is a part of this plugin http://forums.alliedmods.net/showthread.php?t=117992

Last edited by KamiN; 06-16-2012 at 21:02.
KamiN 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 06:11.


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