Raised This Month: $ Target: $400
 0% 

whats wrong?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
marioluda
New Member
Join Date: Aug 2014
Old 08-02-2014 , 23:56   whats wrong?
Reply With Quote #1

#include <sourcemod>

public Plugin:myinfo =
{
name = "Last Survivors",
author = "Eric",
description = "Last Survivors",
version = SOURCEMOD_VERSION,
url = "http://www.sourcemod.net/"
};

public OnPluginStart()
{
HookEvent("player_death", player_death);

}

public player_death(Handle:event, const String:name[], bool:dontBroadcast)
{
new iCount;
new iTeamNum;
for( new iClient = 1; iClient <= MaxClients; iClient++ )
if( IsClientInGame( iClient ) && GetClientTeam( iClient ) == iTeamNum && IsPlayerAlive( iClient ) )
return iCount;

if(iCount == 4)
{
ServerCommand("sm_beacon @all");

}
return iCount;
}


Im trying to get it so that when 4 players are alive it beacons everyone.
marioluda 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 13:04.


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