Raised This Month: $ Target: $400
 0% 

Check if a player is standing on opposite team spawn(buyzone)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 08-08-2010 , 13:31   Re: Check if a player is standing on opposite team spawn(buyzone)
Reply With Quote #1

Ok i tried this with different approach by spawning a fake player of opposite team and check is that player in buyzone, and i dont unerstand why buyzone check always returns 0.
PHP Code:
stock bool:is_in_zone(Float:origin[3],Float:angles[3],team)
{
    new 
Bot engfunc(EngFunc_CreateFakeClient"FlagCheck")
    if (
Bot 0) {
        
dllfunc(MetaFunc_CallGameEntity"player"Bot)
        
set_pev(Botpev_flagsFL_FAKECLIENT)

        
set_pev(Botpev_model"" )
        
set_pev(Botpev_viewmodel2"")
        
set_pev(Botpev_modelindex0)

        
set_pev(Botpev_originorigin)
        
set_pev(Botpev_anglesangles)

        
set_pev(Botpev_renderfxkRenderFxNone)
        
set_pev(Botpev_rendermodekRenderTransAlpha)
        
set_pev(Botpev_renderamt0.0)

        if(
team == 1)    cs_set_user_team(BotCS_TEAM_CT)
        else if(
team == 2)    cs_set_user_team(BotCS_TEAM_T)
        
is_user_bott[Bot] = true
    
}

    
client_print(0,print_chat,"Bot origin:%f %f %f buyzone:%d",origin[0],origin[1],origin[2],cs_get_user_buyzone(Bot))
    if(
cs_get_user_buyzone(Bot))
    {
        return 
true
    
}    
    return 
false

__________________

Jack86 is offline
Leon M.
Senior Member
Join Date: Apr 2009
Location: Germany
Old 08-09-2010 , 05:57   Re: Check if a player is standing on opposite team spawn(buyzone)
Reply With Quote #2

Hi,

you could check in sphere for info_player_start (ct spawn) and info_player_deathmatch (t spawn).

Greetz
Leon
__________________
  • ZapTic - Paintball (Version 7.1.3 b1303)
  • Your #1 CS Paintball Server since 2008
  • 85.131.163.101:27015
Leon M. 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 00:16.


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