Quote:
Originally Posted by Grognak
PHP Code:
public Action:kill(Handle:timer)
{
for( new iClient = 1; iClient <= MaxClients; iClient++ )
if( IsClientInGame( iClient ) )
{
ForcePlayerSuicide( iClient );
}
}
Be sure to read up on proper indentation... it'll save you a lot of headaches in the future. As well, "// do it" is just a comment, if you wanted to force the player's suicide you have to use the function that he linked to.
|
Okey, i have another issue now where i want it to make the suicide at each round now it only make them suicide on plugin start.
i tried doin OnRoundStart instead of OnPluginStart but that didnt work.. :/
Code:
#include <sourcemod>
#include <sdktools>
public Plugin:myinfo =
{
name = "Slay All",
author = "Hannes",
description = "Kills all players after xx minutes",
version = "1.0.0.0",
url = "http://www.kumlaonline.se/"
};
public OnPluginStart()
{
CreateTimer(5.0, kill)
}
public Action:kill(Handle:timer)
{
for( new iClient = 1; iClient <= MaxClients; iClient++ )
if( IsClientInGame( iClient ) )
{
ForcePlayerSuicide(iClient);
}
}