Raised This Month: $ Target: $400
 0% 

Simple Silent Freeze on Round Start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bonkorn
Senior Member
Join Date: Jul 2015
Old 09-05-2017 , 12:05   Simple Silent Freeze on Round Start
Reply With Quote #1

Trying to make plugin that automatically silent (no sounds and effect) freeze players on round start. But some players will be respawned in mid-round and getting freeze so how do i make it work for 'round start' only instead of 'player spawn'?

Tried these but doesn't work:
PHP Code:
HookEvent("teamplay_round_start"PlayerSpawnEventHookMode_Post);
HookEvent("teamplay_round_start"PlayerSpawnEventHookMode_Pre);
HookEvent("round_start"PlayerSpawnEventHookMode_Post);
HookEvent("round_start"PlayerSpawnEventHookMode_Pre); 
PHP Code:
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo 
{
    
name "Silent Freeze Round Start",
    
author "Bonkorn"
}

public 
OnPluginStart()
{
    
HookEvent("player_spawn"PlayerSpawnEventHookMode_Post);
}

public 
PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    
SetEntityMoveType(clientMOVETYPE_NONE);
    
CreateTimer(10.0Timer_UnfreezeclientTIMER_FLAG_NO_MAPCHANGE);
}

public 
Action:Timer_Unfreeze(Handle:timerany:client)
{
    
SetEntityMoveType(clientMOVETYPE_WALK);

Bonkorn is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 09-05-2017 , 12:46   Re: Simple Silent Freeze on Round Start
Reply With Quote #2

hook round start then loop through all the client indexs and freeze them if they are ingame and alive
8guawong is offline
Reply



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 00:59.


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