Raised This Month: $ Target: $400
 0% 

Detect spectating?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 01-01-2006 , 06:53   Detect spectating?
Reply With Quote #1

How to: If "id" (loop all) spectating and admin call func(id)


Thx!
__________________
Sig(h)!
Obbin is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-01-2006 , 08:49  
Reply With Quote #2

This is the right way:
Code:
// new players[32], num, tchar[2] get_players(players, num, "b") for (new i = 0; i < num; ++i) {     get_user_team(players[i], tchar, 1)     if (tchar[0] == 'S' && get_user_flags(players[i]) > 0 && !(get_user_flags(players[i]) & ADMIN_USER)) {         // ...     } }

Note for those who think that get_players(players, num, "e", "SPECTATOR") is better.
This isn't good way because sometimes get_players works incorrect with "e"-flag.
VEN is offline
Sandurr
Senior Member
Join Date: Aug 2005
Old 01-01-2006 , 10:55  
Reply With Quote #3

if(!is_user_alive(id)) =P
Sandurr is offline
Obbin
Senior Member
Join Date: Mar 2005
Location: 192.168.1.3
Old 01-01-2006 , 11:08  
Reply With Quote #4

ty!
__________________
Sig(h)!
Obbin is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 01-01-2006 , 11:57  
Reply With Quote #5

Quote:
Originally Posted by Sandurr
if(!is_user_alive(id)) =P
Is you can see i used "b" flag for that purpose so this is not needed.
VEN 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 16:11.


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