Raised This Month: $ Target: $400
 0% 

Blocking input while dead


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Des12
Senior Member
Join Date: Jan 2005
Old 09-10-2007 , 18:07   Blocking input while dead
Reply With Quote #1

Hello everyone, I'm once again coding for The Specialists, and in The Specialists, once a player dies he must press +attack to respawn.

Blocking IN_ATTACK works perfectly when the player is alive, but does not work at all when he is dead.

Code:
public client_PreThink(id) {     if(!is_user_alive(id)) { // if I take away, person still can spawn but can't attack while alive         if(g_spawnblock[id] > 0) { //is always > 0             new bufferstop = entity_get_int(id,EV_INT_button)                 if(bufferstop != 0) {                 entity_set_int(id,EV_INT_button,bufferstop & ~IN_ATTACK & ~IN_ATTACK2 & ~IN_USE & ~IN_ALT1)             }                                       return PLUGIN_HANDLED;         }     } }

Strange, anyone have a solution to preventing someone from spawning?
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
 


Thread Tools
Display Modes

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 16:10.


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