Jump to content
assignment_ind Existing user? Sign In

Sign In



person_add Sign Up
Go-Code.pl - Support SourceMod i Pluginy CS:GO
Sign in to follow this  
laibach

Mam jedno takie pytanie

Recommended Posts

Witam.

Jak sama nazwa wskazuje, mam jedno pytanie, czy istnieje wtyczka, która karze gracza za rzucenie bomby. na przykład biorąc jego dolara, dając mu pedał lub zabójstwo, czy coś takiego. Dziękuję za odpowiedź.

Share this post


Link to post
Share on other sites

Could you say this in English?

  • Lubię to! 1

Share this post


Link to post
Share on other sites
2 godziny temu, laibach napisał:

 

 

As the name suggests, I have one question whether there is a plugin that will punish a player for throwing a bomb. For example, take him the money, give him a slap or slay or something. Thank you for your response.

Edited by laibach

Share this post


Link to post
Share on other sites

Should work

Spoiler

/* [ Includes ] */
#include <sourcemod>
#include <sdktools>
#include <multicolors>

/* [ Compiler Options ] */
#pragma newdecls required
#pragma semicolon 1

/* [ Defines ] */
#define PluginTag 		"{lightred}★{darkred} Drop Bomb {lightred}★ {default}"

/* [ ConVars ] */
ConVar g_cvSlapDamage;

/* [ Plugin Author and Informations ] */
public Plugin myinfo =
{
	name = "[CS:GO] Yamakashi - Drop Bomb",
	author = "Yamakashi",
	description = "If someone drop the bomb, plugin will slap him.",
	version = "1.0",
	url = "https://steamcommunity.com/id/yamakashisteam"
};

/* [ Plugin Startup ] */
public void OnPluginStart()
{
	/* [ ConVars ] */
	g_cvSlapDamage = CreateConVar("sm_slap_damage", "1", "Damage for slap");
}

/* [ Standart Actions ] */
public void OnMapStart()
{
	AutoExecConfig(true, "DropBomb", "yPlugins");
}

/* [ Weapon Drop ] */
public Action CS_OnCSWeaponDrop(int client, int weapon)
{
	char sWeaponName[80];
	if(GetEntityClassname(weapon, sWeaponName, sizeof(sWeaponName)))
	if(IsValidEdict(weapon))
	{
		if(StrEqual(sWeaponName, "weapon_c4"))
		{
			SlapPlayer(client, g_cvSlapDamage.IntValue, true);
			CPrintToChat(client, "%s You can't drop the bomb.", PluginTag);
		}
	}
}

 

 

Edited by Yamakashi
  • Lubię to! 1

Share this post


Link to post
Share on other sites

works very well thank you

Share this post


Link to post
Share on other sites

only has one bug if the player carries a bomb and kills him so he will give him a slap before that and he says he shouldn't drop the bomb

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.


O NAS Jesteśmy społecznością łączącą ludzi, którzy dzielą pasję poznawania CS:GO od strony programistycznej. Posiadamy duże zaplecze merytoryczne i zawsze cieszymy się, gdy dołączają do nas osoby gotowe do nauki. Gwarantujemy, że z odrobiną wytrwałości i otwartym umysłem bardzo szybko napiszesz swój pierwszy plugin. Zapraszamy! 🙂
Szablon wykonany z dużą ilością przez cyberpixelz / Mesharsky / Sitefuture
Forum dumnie napędzane przez: Invision Power Services, Inc.
×
×
  • Create New...