How to give attributes / perks to the last guy alive on a singular team.
Title says it, I just need to know how (This includes mini crits, longer range or something)
Also, why doesnt this work? public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast) { if (GetPlayerCount() == 1) { for(new i = 1; i <= MaxClients; i++) { if(IsValidClient(i) && IsPlayerAlive(i) && GetClientTeam(i) == 2) { CPrintToChatAll("{red}%N is getting an boost!", i); ServerCommand("sm_givew_ex @red 8001"); ServerCommand("sm_givew @red 8001"); } } } } On TF2 ^^^ Last guy on red team should get that weapon |
Re: How to give attributes / perks to the last guy alive on a singular team.
Are you using a plugin that already allows some clients to have these "perks"
|
Re: How to give attributes / perks to the last guy alive on a singular team.
Quote:
|
Re: How to give attributes / perks to the last guy alive on a singular team.
????? Can someone help me?
|
Re: How to give attributes / perks to the last guy alive on a singular team.
Quote:
I think this question belongs to the scripting section. Maybe take a second look at the forum rules please put your code in [php][/php]-tags for better readabilty. you should show us the full code or all necessary code parts for this function. I assume your problem is: the function don't fire cause GetPlayerCount count all players (maybe even alive) and not only from team red. But I don't know how your GetPlayerCount works. But this should do the job: PHP Code:
|
All times are GMT -4. The time now is 11:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.