sourcepawnのタグがつけられたコード一覧

C kissme.sp

#pragma semicolon 1

#include <sourcemod>
#include <tf2>
#include <tf2_stocks>

#define PLUGIN_VERSION "1.0.0"

public Plugin:myinfo =
{
	name = "Kiss me.",
	author = "Kiss me.",
	description = "Kiss me.",
	version = PLUGIN_VERSION,
	url = ""
}

public OnPluginStart()
{
	AddNormalSoundHook(HookSound);
}

public OnMapStart()
{
	PrecacheSound("vo/heavy_generic01.wav");
}

public Action:HookSound(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &ent, &channel, &Float:volume, &level, &pitch, &flags)
{

	if (ent < 1 || ent > MaxClients || channel < 1)
		return Plugin_Continue;

	if (TF2_GetPlayerClass(ent) == TFClass_Heavy)
	{
		if(StrContains(sample, "vo/heavy_", false) != -1){
			Format(sample, PLATFORM_MAX_PATH, "vo/heavy_generic01.wav");
		}

		return Plugin_Changed;
	}

	return Plugin_Continue;

}

よく投稿されているコード

タグ

最近投稿されたコード