Raised This Month: $51 Target: $400
 12% 

backstab for different team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Saint Sinner
Senior Member
Join Date: Feb 2016
Old 03-04-2016 , 18:25   backstab for different team
Reply With Quote #1

Hy all! I have a problem about this...after behind my team get me respawn...I want to get respawn after behind other team example :

terrorist behind terrorist = no respawn
counter terrorist behind counter terrorist = no respawn

terrorist behind counter terrorist = respawn
counter terrorist behind terrorist = respawn



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

public OnClientPutInServer(client){
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public OnClientDisconnect(client){
	SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype){
	if(victim <= 0 && victim > MaxClients){ return Plugin_Continue; }
	if(attacker <= 0 || attacker > MaxClients){ return Plugin_Continue; }
	if(damage > 66.0){
		new String:wep[64];GetClientWeapon(attacker, wep, sizeof(wep));
		if(StrEqual(wep, "weapon_knife", false)){
			PrintToChat(attacker, "\x01[SM]\x04 Backstab detected!");
			ClientCommand(attacker, "play *weapons/awp/awp1.wav");
			damage = 0.0;
			CS_RespawnPlayer(attacker);
			return Plugin_Changed;
		}
	}
	return Plugin_Continue;
}
Saint Sinner is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 03-04-2016 , 20:19   Re: backstab for different team
Reply With Quote #2

Code:
if(GetClientTeam(attacker) == 3 && GetClientTeam(victim) == 2) {
   CS_RespawnPlayer(attacker);
   damage = 0.0; 
}
if(GetClientTeam(attacker) == 2 && GetClientTeam(victim) == 3) {
   CS_RespawnPlayer(attacker);
   damage = 0.0; 
}

Last edited by raizo11; 03-05-2016 at 23:21.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
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 04:30.


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