View Single Post
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 02-29-2016 , 15:47   Re: [CSGO] - ◷ Timer
Reply With Quote #6

I want prevent damage for players who have "Timer: Stop" and if there are more spawn points than 0
I tried to include such code in timer-mapzones_damage_controller.sp
Code:
public Action:Hook_OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype)
{
	new style_victim = Timer_GetStyle(victim);
	
	if(!Timer_GetStatus(victim) && Timer_GetMapzoneCount(ZtStart) > 0) {
		RemovePunchAngle(victim);
		return Plugin_Handled;
	}
......
}
doesn't work at all. Can I help some help with this? I want to disable hud in same way. with Timer_GetMapzoneCount > 0 and settings too if possible and make auto respawn for people if they die...

EDIT:
OH NEVER MIND I was editing in wrong place

I made small plugin if smbd needs

Code:
#include <sourcemod>
#include <cstrike>
#include <sdkhooks>
#include <smlib>
#include <timer>

public Plugin:myinfo =
{
	name        = "[TIMER] Slay after completing",
	author      = "iGANGNAM",
	description = "[Timer] Slay after completing",
	version     = PL_VERSION,
	url         = "forums.alliedmods.net/showthread.php?p=2074699"
};

public int OnTimerRecord(client, track, style, Float:time, Float:lasttime, currentrank, newrank) {
	if(Client_IsValid(client)) {
		CreateTimer(3.0, SlayPlayer, client);
	}
}

public Action SlayPlayer(Handle timer, any client)
{
	if(Client_IsValid(client)) {
		ForcePlayerSuicide(client);
	}
}
It kills person after 3 seconds he finishes map. Good plugin for course maps I guess if u have damage enabled.

ALSO:
When map comes to 00:00 it doesn't change what is the problem?

Last edited by iGANGNAM; 02-29-2016 at 16:32.
iGANGNAM is offline