AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to find the last player on a team ? (https://forums.alliedmods.net/showthread.php?t=48828)

godlike 12-21-2006 06:25

How to find the last player on a team ?
 
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 ?

Simon Logic 12-21-2006 06:57

Re: How to find the last player on a team ?
 
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).


All times are GMT -4. The time now is 08:01.

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