vote timebomb
-
- 250+ Posts
- Posts: 367
- Joined: Sat Jan 29, 2011 4:26 pm
vote timebomb
We need a votetimebomb command where if someone is Afk, players can vote timebomb and be killed after the 10 second countdown but make it so that if the player moves within the countdown, the countdown is canceled
-
- Former Server Admin
- Posts: 1163
- Joined: Fri Apr 23, 2010 2:56 am
- Location: United Kingdom
Re: vote timebomb
Or just do a manual vote lulz
!vote "Explode Roaring" Yes No
Only a problem if no admins are online.
!vote "Explode Roaring" Yes No
Only a problem if no admins are online.
-
- 250+ Posts
- Posts: 367
- Joined: Sat Jan 29, 2011 4:26 pm
Re: vote timebomb
thats why I ask votetimebomb
-
- 1000+ Posts
- Posts: 1280
- Joined: Fri Sep 03, 2010 8:51 pm
Re: vote timebomb
plus noobs cant spam it because it only works on afk ppl.
i vote we add votetimebomb
i vote we add votetimebomb
Spoiler
Show
Saying "Your lucky i'm peaceful" is pretty much like saying "when i grow up i wanna be an arms race!"-HL2shadowslayer, Area 51 Minecraft
-
- 50+ Posts
- Posts: 69
- Joined: Wed May 18, 2011 11:23 pm
Re: vote timebomb
Y NOWT JUS USE VOTEKICK IT WILL ACCOMPLISH TEH SAME AS "VOTETIMEBOMB" ANYWAY TEH BEST SOLUSHUN IZ 2 START TIEMBOMB ON ANYONE HOO IZ AFK 4 OVAR MINIT AN ONLY CANCEL IT ONCE THEY MOOV
-
- 500+ Posts
- Posts: 588
- Joined: Mon Jul 05, 2010 8:51 pm
- Location: Ontario, Canada
Re: vote timebomb
jimmythecanadian wrote:Y NOWT JUS USE VOTEKICK IT WILL ACCOMPLISH TEH SAME AS "VOTETIMEBOMB" ANYWAY TEH BEST SOLUSHUN IZ 2 START TIEMBOMB ON ANYONE HOO IZ AFK 4 OVAR MINIT AN ONLY CANCEL IT ONCE THEY MOOV
Good Idea, they could add this, just have it so when people spawn it creates a timer in a handle like AFKTImer[Client] = CreateTimer(.....); then on the even OnPlayerRunCmd() if they move it kills that timer or another way is have a boolean called afk set to true then when someone moves its set to false and then when the round starts it creates a timer to run in around 5 minutes and it loops through all the players that have the afk boolean set to false and slays them
Example you can use...
Code: Select all
#include <sourcemod>
#include <sdktools>
#pragma semicolon 1
#define PLUGIN_VERSION "0.4.3"
new bool:IsSpawned[MAXPLAYERS+1];
new Handle:SpawnProtectTimers[MAXPLAYERS+1];
new g_offsCollisionGroup;
SpawnProtect(client,v) {
if(v == 1 && IsClientConnected(client) && IsClientInGame(client)) {
SetEntProp(client, Prop_Data, "m_takedamage", 0, 1);
SetEntData(client, g_offsCollisionGroup, 2, 4, true);
SetEntityRenderColor(client, 255, 255 ,255 ,128);
SetEntityRenderMode(client, RENDER_TRANSCOLOR);
}
else if(v == 0 && IsClientConnected(client) && IsClientInGame(client)) {
SetEntProp(client, Prop_Data, "m_takedamage", 2, 1);
SetEntData(client, g_offsCollisionGroup, 5, 4, true);
SetEntityRenderColor(client, 255, 255 ,255 ,255);
SetEntityRenderMode(client, RENDER_NORMAL);
}
}
public Plugin:myinfo =
{
name = "RP Spawn SpawnProtect",
author = "Smacked",
description = "RP Players have NoBlock & God untill move",
version = PLUGIN_VERSION,
url = "N/A"
}
public OnPluginStart() {
CreateConVar("rp_spawnprotect_version", PLUGIN_VERSION, "Plugin RP Spawn Protect current version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
HookEvent( "player_spawn", PlayerSpawn_Event, EventHookMode_Post);
HookEvent( "player_death", PlayerDeath_Event, EventHookMode_Post);
g_offsCollisionGroup = FindSendPropOffs("CBaseEntity", "m_CollisionGroup");
}
public OnClientPutInServer(Client) {
IsSpawned[Client] = false;
}
public OnClientDisconnect(Client) {
if(SpawnProtectTimers[Client] != INVALID_HANDLE) {
KillTimer(SpawnProtectTimers[Client]);
SpawnProtectTimers[Client] = INVALID_HANDLE;
}
}
public Action:PlayerSpawn_Event( Handle:event, const String:name[], bool:dontBroadcast ) {
new iUserId = GetEventInt(event, "userid");
new iClient = GetClientOfUserId(iUserId);
if (iClient != 0) {
IsSpawned[iClient] = true;
SpawnProtect(iClient, 1);
}
if(SpawnProtectTimers[iClient] != INVALID_HANDLE) {
KillTimer(SpawnProtectTimers[iClient]);
SpawnProtectTimers[iClient] = INVALID_HANDLE;
}
return Plugin_Continue;
}
public Action:PlayerDeath_Event( Handle:event, const String:name[], bool:dontBroadcast ) {
new iUserId = GetEventInt(event, "userid");
new iClient = GetClientOfUserId(iUserId);
if (iClient != 0) {
IsSpawned[iClient] = false;
SpawnProtect(iClient, 0);
}
if(SpawnProtectTimers[iClient] != INVALID_HANDLE) {
KillTimer(SpawnProtectTimers[iClient]);
SpawnProtectTimers[iClient] = INVALID_HANDLE;
}
}
public Action:ResetSpawnProtect(Handle:timer, any:client) {
if (client != 0 && IsPlayerAlive(client) && IsClientInGame(client)) {
SpawnProtect(client, 0);
}
if(SpawnProtectTimers[client] != INVALID_HANDLE) {
KillTimer(SpawnProtectTimers[client]);
SpawnProtectTimers[client] = INVALID_HANDLE;
}
return Plugin_Stop;
}
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon) {
if ( IsSpawned[client] && (
((buttons & IN_FORWARD)) ||
((buttons & IN_BACK)) ||
((buttons & IN_MOVERIGHT)) ||
((buttons & IN_MOVELEFT)) ||
((buttons & IN_ATTACK)) ||
((buttons & IN_ATTACK2)) ||
((buttons & IN_DUCK)) ||
((buttons & IN_JUMP)) ||
((buttons & IN_SPEED))
)
) {
IsSpawned[client] = false;
SpawnProtectTimers[client] = CreateTimer(2.0, ResetSpawnProtect, client, 0);
}
return Plugin_Continue;
}
Unkown wrote: Life’s too short to worry about the little things.
Albert Einstein wrote: You do not really understand something unless you can explain it to your grandmother.