Raised This Month: $ Target: $400
 0% 

Plugin doesnt register event.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Pantheon
Member
Join Date: Jan 2011
Old 01-07-2011 , 14:16   Re: Plugin doesnt register event.
Reply With Quote #5

I get these errors:
PHP Code:
L 01/07/2011 20:14:13: [CSTRIKEPlayer out of range (0)
L 01/07/2011 20:14:13: [AMXXDisplaying debug trace (plugin "mod.amxx")
L 01/07/2011 20:14:13: [AMXXRun time error 10native error (native "cs_get_user_team")
L 01/07/2011 20:14:13: [AMXX]    [0assassinsmod.sma::Event_TeamInfo (line 38
PHP Code:
#include <amxmodx>
#include <cstrike>

public plugin_init() {
    
register_plugin("Mod","0.0.1","Pantheon")
    
register_clcmd("say !team","Event_TeamCheck",0," prints how many players in each team.")
    
register_logevent("RoundStart",2,"1=Round_Start")
    
register_event("TeamInfo""Event_TeamInfo""a")
}

public 
GetTeamCounts( &TCount , &CTCount )    {
    new 
iMaxPlayers get_maxplayers()
    
TCount 0
    CTCount 
0

    
for ( new <= iMaxPlayers i++ )    {
        if ( !
is_user_connected) )
            continue

        switch ( 
cs_get_user_team) )    {
            case 
CS_TEAM_TTCount++
            case 
CS_TEAM_CTCTCount++
        }
    }
}

public 
RoundStart() {
    new 
iTs iCTs
    GetTeamCounts
iTs iCTs )
    
client_printprint_center "Teams are being arranged. Stay Patient.")
    if (
iTs 2)
        
set_task(3.0,"Transfer_NoAction"0)
}

public 
Event_TeamInfo() {
    
client_print(0print_chat"Success!")
    new 
zUser[32], i
    
if (cs_get_user_team(zUser[i])==CS_TEAM_T)
        
cs_set_user_team(zUser[i], CS_TEAM_CTCS_DONTCHANGE)
    else
        
set_task(3.0,"Transfer_NoAction"0)
}

public 
Transfer_NoAction() {
    
client_print(0print_center"No Action was taken!")
}

public 
Event_TeamCheck() {
    new 
iTs iCTs
    GetTeamCounts
iTs iCTs )
    
client_printprint_chat "Terrorist=%d Counter Terrorist=%d" iTs iCTs )


Last edited by Pantheon; 01-07-2011 at 14:24.
Pantheon 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:10.


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