Raised This Month: $ Target: $400
 0% 

change message mode


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MBf
Member
Join Date: Aug 2016
Old 12-03-2017 , 07:27   change message mode
Reply With Quote #1

Hello,

I need help with this plugin and I want the message to appear in the center of the screen and not in the chat.

Thank you.


Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <multi1v1>
#include <multicolors>
#include <cstrike>
bool g_bDeagle1Tap[MAXPLAYERS + 1] = false;
public Plugin myinfo = 
{
	name = "[CSGO]Multi 1v1 - Deagle 1 Tap", 
	author = "S4muRaY'", 
	description = "", 
	version = "1.0", 
	url = "http://steamcommunity.com/id/bravefox"
};

public void OnPluginStart()
{
	HookEvent("round_end", round_end);
}
public void Multi1v1_OnRoundTypesAdded()
{
	Multi1v1_AddRoundType("Deagle 1 Tap", "deagle1tap", Deagle1TapHandler, true, true, "", true);
}
public void Deagle1TapHandler(int client)
{
	int deagle = GivePlayerItem(client, "weapon_deagle");
	EquipPlayerWeapon(client, deagle);
	g_bDeagle1Tap[client] = true;
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
	CPrintToChat(client, "[{green}Arena 1v1{default}]This is Deagle 1 Tap Only Fight!");
	int knife = GetPlayerWeaponSlot(client, CS_SLOT_KNIFE);
	if (IsValidEntity(knife))
	{
		AcceptEntityInput(knife, "Kill");
	}
}
public Action OnTakeDamage(int client, int &attacker, int &inflictor, float &damage, int &damagetype, int &weapon, float damageForce[3], float damagePosition[3], int damagecustom)
{
	if (g_bDeagle1Tap[attacker] && damagetype != 1073745922)
	{
		damage *= 0;
		return Plugin_Changed;
	}
	return Plugin_Continue;
}
public Action round_end(Event event, char[] name, bool dontBroadcast)
{
	for (int i = 1; i <= MaxClients; i++)
	{
		if (i > 0 && i <= MaxClients && IsClientInGame(i))
		{
			g_bDeagle1Tap[i] = false;
			SDKUnhook(i, SDKHook_OnTakeDamage, OnTakeDamage);
		}
	}
}
__________________
PLAY.ACEARENA.RO
WWW.ACEARENA.RO
MBf is offline
 



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


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