Raised This Month: $ Target: $400
 0% 

Help about check...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
killergirl
Senior Member
Join Date: Jul 2010
Old 10-11-2010 , 14:02   Help about check...
Reply With Quote #1

Code:
new_2.sma(55) : warning 213: tag mismatch
new_2.sma(59) : warning 213: tag mismatch
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fakemeta>
#include <cstrike>

#define TIME 10.0
#define ACCESS ADMIN_RESERVATION

new Float:player_origin[33][3];

public 
plugin_init()
{
    
RegisterHam(Ham_Spawn"player""e_Spawn"1);
}
 
public 
e_Spawn(id)
{
    
remove_task(id)
    if(
is_user_alive(id))
    {
        
set_task(0.8"get_spawn"id);
    }
    return 
HAM_IGNORED;
}

public 
get_spawn(id)
{
    
pev(idpev_originplayer_origin[id]);
    
set_task(TIME"check_afk"id);
}
 
public 
check_afk(id)
{
    if(
is_user_alive(id))
    {
        if(
same_origin(id))
        {
            
user_silentkill(id);
            
cs_set_user_team(id,CS_TEAM_SPECTATOR);
            new 
name[33];
            
get_user_name(idname32);
            
client_print(0print_chat,  "[AMXX] %s was killed and moved: AFK!"name);
            
set_task(70.0,"check_afk_spec",id);
        }
    }    
}

public 
check_afk_spec(id)
{
    if(
is_user_alive(id))
    {
        if(
same_origin(id))
        {
            if(!
get_user_flags(id) & ACCESS){
                return 
PLUGIN_HANDLED
                    
}
                    else{
                        if(!
cs_get_user_team(id) == CS_TEAM_SPECTATOR){
                            new 
name[32]
                            
get_user_name(idname31)
                            
server_cmd("kick %s AFK!"name)
                            
client_print(0print_chat"[AMXX] %s was kicked: AFK!"name)
                            }
                        }
        }
    }
    return 
PLUGIN_CONTINUE
}
 
public 
same_origin(id)
{
    new 
Float:origin[3];
    
pev(idpev_originorigin);
    for(new 
03i++)
        if(
origin[i] != player_origin[id][i])
            return 
0;
    return 
1;

I don't know why I getting this warning, what I did wrong? (also, the script wasn't checked)
killergirl 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 10:26.


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