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

change message mode


Post New Thread Reply   
 
Thread Tools Display Modes
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
MBf
Member
Join Date: Aug 2016
Old 12-04-2017 , 10:16   Re: change message mode
Reply With Quote #2

nobody ?
__________________
PLAY.ACEARENA.RO
WWW.ACEARENA.RO
MBf is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 12-04-2017 , 10:22   Re: change message mode
Reply With Quote #3

Here, you can adjust the holdtime and x + y, colors and what not to your liking.

Spoiler
__________________
xines 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 05:44.


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