Raised This Month: $51 Target: $400
 12% 

How to give attributes / perks to the last guy alive on a singular team.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
cigzag
AlliedModders Donor
Join Date: Nov 2014
Location: NZ
Old 04-26-2017 , 21:00   How to give attributes / perks to the last guy alive on a singular team.
Reply With Quote #1

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

Last edited by cigzag; 04-27-2017 at 05:42.
cigzag is offline
 



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 19:05.


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