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

Solved cs_get_user_team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 04-23-2020 , 05:04   cs_get_user_team
Reply With Quote #1

Hello. What I should use instead of "cs_get_user_team" ?

error 017: undefined symbol "cs_get_user_team"

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "AWP limit by players"
#define VERSION "1.0"
#define AUTHOR "ArtHa"

#define VIP ADMIN_LEVEL_H
#define VIPN ADMIN_LEVEL_B

new bool:gAwpBlock;
new 
awp_vipcvar_playerawp_blockawp_limit
new g_pHp], chat_message


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_dictionary("kita.txt")
    
    
awp_vip register_cvar"amx_vip_awp""0" )
    
awp_limit register_cvar"amx_awp_limit""1" )
    
awp_block register_cvar"amx_awp_block""1" )
    
cvar_player register_cvar("na_players_count""10")
    
    
register_event"DeathMsg""Event_DeathMsg""a" )
    
g_pHp] = register_cvar"amx_vip_hpadd""3" )
    
g_pHp] = register_cvar"amx_vip_hsadd""5" )
    
g_pHp] = register_cvar"amx_vip_hpmax""100" )
    
    
chat_message register_cvar"amx_hpbonus_msg""2" )
    
    
register_event("CurWeapon""event_CurWeapon""be")
}

public 
Event_DeathMsg( )
{
    new 
iKiller read_data)
    new 
iVictim read_data)
    new 
HeadShot read_data)
    
    if( 
get_user_teamiKiller ) == get_user_teamiVictim ) )
        return
    
    if( 
iKiller && iVictim != iKiller && get_user_flags(iKiller) & VIPN )
    {
        static 
maxhphp
        maxhp 
get_pcvar_numg_pHp] )
        
hp get_user_healthiKiller )
        
        if( 
hp != maxhp )
        {
            new 
BonusHp;
            if( 
HeadShot BonusHp get_pcvar_numg_pHp] )
            else 
BonusHp get_pcvar_numg_pHp] )
            
            if( 
hp BonusHp maxhp )
            {
                
set_user_healthiKillermaxhp )
                
                if(
get_pcvar_num(chat_message) == 1)
                    
ChatColor(iKiller"%L"iKiller"HP_BONUS"maxhp hp )
                    
                else if(
get_pcvar_num(chat_message) == 2)
                {
                    
set_hudmessage(1051171510.50.820.14.00.10.12)
                    
show_hudmessage(iKiller"%L"iKiller"HP_BONUS"maxhp hp );
                }    
            } 
            else
            {
                
set_user_healthiKillerhp BonusHp )
                
                if(
get_pcvar_num(chat_message) == 1)
                    
ChatColor(iKiller"%L"iKiller"HP_BONUS"BonusHp )
                    
                else if(
get_pcvar_num(chat_message) == 2)
                {
                    
set_hudmessage(1051171510.50.820.14.00.10.12)
                    
show_hudmessage(iKiller"%L"iKiller"HP_BONUS"BonusHp );
                }
            }
        }
    }    
}

public 
GetCount()
{
    new 
iPlayers32 ] , iNum iCount;
    
    
get_playersiPlayers iNum );
    
    for ( new 
iNum i++ )
        
iCount += _:( cs_get_user_teamiPlayers] ) != CS_TEAM_SPECTATOR );
        
    return 
iCount;


public 
event_CurWeapon(id)
{
    new 
szMapname[64]
    
get_mapname(szMapname63)
    
    if( 
containi(szMapname"cs_max") != -|| containi(szMapname"2x2") != -|| containi(szMapname"_2x2") != -1)
        
gAwpBlock true
        
    
if(containi(szMapname"awp"))
    {
        
gAwpBlock false
        
switch(read_data(2))
        {
            case 
CSW_AWPCSW_SCOUTCSW_SG550CSW_G3SG1:
            {
                if(
get_pcvar_num(awp_block) == && gAwpBlock)
                {
                    
client_cmd(id"drop")
                    
client_print_color(idprint_team_red"%L"id"AWP_BLOCK" )
                }
                
                if(
get_pcvar_num(awp_limit) == && GetCount() < get_pcvar_num(cvar_player)) // psychical code
                
{
                    
client_cmd(id"drop")
                    
client_print_color(idprint_team_red"%L"id"AWP_LIMIT"get_pcvar_num(cvar_player) )
                }
                
                if(
get_pcvar_num(awp_vip) == && (!(get_user_flags(id) & VIP)))
                {
                    
client_cmd(id"drop")
                    
client_print_color(idprint_team_red"%L"id"AWP_DROP" )
                }
            }
        }
    }
}

stock ChatColor(const id, const szMessage[], any:...)
{
    static 
szMsg[190], IdMsg;
    
vformat(szMsgcharsmax(szMsg), szMessage3);
    
    if(!
IdMsgIdMsg get_user_msgid("SayText");
    
    
message_begin(MSG_ONEIdMsg, .player id);
    
write_byte(id);
    
write_string(szMsg);
    
message_end();
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1257\\ deff0\\ deflang1063{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
Attached Files
File Type: sma Get Plugin or Get Source (cawp_limit_bp.sma - 99 views - 4.0 KB)

Last edited by LithuanianJack; 04-23-2020 at 05:14.
LithuanianJack is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 04-23-2020 , 05:11   Re: cs_get_user_team
Reply With Quote #2

#include <cstrike>
__________________
GitHub
SteamWishlist

六四天安門事件
+ARUKARI- is offline
LithuanianJack
Senior Member
Join Date: Nov 2013
Location: Vilnius, Lithuania
Old 04-23-2020 , 05:14   Re: cs_get_user_team
Reply With Quote #3

Quote:
Originally Posted by +ARUKARI- View Post
#include <cstrike>
LOL thank you . Solved.
LithuanianJack 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 15:33.


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