Raised This Month: $ Target: $400
 0% 

How to find the last player on a team ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
godlike
Senior Member
Join Date: Apr 2005
Old 12-21-2006 , 06:25   How to find the last player on a team ?
Reply With Quote #1

hej i want to make a plugin that gives some extra when all your teammates are death and you the last one on your team against lets say eehm.. 3 enemys. How can i find the last player on the team alive ?
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 12-21-2006 , 06:57   Re: How to find the last player on a team ?
Reply With Quote #2

Evidently, using get_players:
Code:
/* Sets indexes of players. * Flags: * "a" - don't collect dead players. * "b" - don't collect alive players. * "c" - skip bots. * "d" - skip real players. * "e" - match with team. * "f" - match with part of name. * "g" - ignore case sensitivity. * "h" - skip HLTV. * Example: Get all alive CTs: get_players(players,num,"ae","CT") */ native get_players(players[32], &num ,const flags[]="", const team[]="");

When update this quantity vars? On round start, on player disconnect & on player death (by default using no external hacking plugins).
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Reply


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 08:01.


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