Raised This Month: $ Target: $400
 0% 

How to cross when the teamplayer stand in the doorway


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 08-06-2012 , 05:08   How to cross when the teamplayer stand in the doorway
Reply With Quote #1

if the player has ADMIN_IMMUNITY flag,when the team player stand in the doorway,

how to cross ? (just cross players)
__________________
One Code , One Dream !

Last edited by wangningyu; 08-06-2012 at 05:09.
wangningyu is offline
Firippu
Senior Member
Join Date: Jan 2007
Old 08-06-2012 , 07:06   Re: How to cross when the teamplayer stand in the doorway
Reply With Quote #2

Try this

PHP Code:
#include <amxmodx>
#include <engine>
#include <cstrike>

#define VERSION "0.1"

new bool:bIsSolid[33]
new 
bool:bHasFlag[33]

public 
plugin_init() {
    
register_plugin("block_pass",VERSION,"Firippu")
    
register_touch("player","player","fwdPlayerTouch")
}

public 
client_putinserver(iPlayer) {
    
bIsSolid[iPlayer]=false
    bHasFlag
[iPlayer]=false

    
if(get_user_flags(iPlayer) & ADMIN_IMMUNITY) {
        
bHasFlag[iPlayer]=true
    
}
}

public 
fwdPlayerTouch(iPlayer,iOther) {
    if(
bHasFlag[iPlayer]) {
        if(
cs_get_user_team(iPlayer)==cs_get_user_team(iOther)) {
            if(!
bIsSolid[iOther]) {
                
bIsSolid[iOther]=true
                entity_set_int
(iOther,EV_INT_solid,SOLID_NOT)
                
set_task(0.1,"makeSolid",iOther)
            }
        }
    }
}

public 
makeSolid(iOther) {
    
entity_set_int(iOther,EV_INT_solid,SOLID_BBOX)
    
bIsSolid[iOther]=false

__________________
Firippu is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-06-2012 , 19:32   Re: How to cross when the teamplayer stand in the doorway
Reply With Quote #3

OT: Play Source! lol. Sorry, had to say it. I hate Source for this reason.
__________________
fysiks is offline
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 08-07-2012 , 01:53   Re: How to cross when the teamplayer stand in the doorway
Reply With Quote #4

Quote:
Originally Posted by Firippu View Post
Try this

PHP Code:
#include <amxmodx>
#include <engine>
#include <cstrike>

#define VERSION "0.1"

new bool:bIsSolid[33]
new 
bool:bHasFlag[33]

public 
plugin_init() {
    
register_plugin("block_pass",VERSION,"Firippu")
    
register_touch("player","player","fwdPlayerTouch")
}

public 
client_putinserver(iPlayer) {
    
bIsSolid[iPlayer]=false
    bHasFlag
[iPlayer]=false

    
if(get_user_flags(iPlayer) & ADMIN_IMMUNITY) {
        
bHasFlag[iPlayer]=true
    
}
}

public 
fwdPlayerTouch(iPlayer,iOther) {
    if(
bHasFlag[iPlayer]) {
        if(
cs_get_user_team(iPlayer)==cs_get_user_team(iOther)) {
            if(!
bIsSolid[iOther]) {
                
bIsSolid[iOther]=true
                entity_set_int
(iOther,EV_INT_solid,SOLID_NOT)
                
set_task(0.1,"makeSolid",iOther)
            }
        }
    }
}

public 
makeSolid(iOther) {
    
entity_set_int(iOther,EV_INT_solid,SOLID_BBOX)
    
bIsSolid[iOther]=false

thanks !
__________________
One Code , One Dream !
wangningyu is offline
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 08-07-2012 , 01:54   Re: How to cross when the teamplayer stand in the doorway
Reply With Quote #5

Quote:
Originally Posted by wangningyu View Post
thanks !
__________________
One Code , One Dream !
wangningyu 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 09:55.


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