C bethevagineer.sp

このエントリーをはてなブックマークに追加このエントリのはてなブックマーク数このエントリをLivedoor Clipに追加このエントリをYahoo!ブックマークに追加このエントリをFC2ブックマークに追加このエントリをNifty Clipに追加このエントリをつぶやく

mp3 http://dl.dropboxusercontent.com/u/7333770/tf2/vagineer.zip

#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <tf2>
#include <tf2_stocks>

#define PLUGIN_VERSION "1.1.0"

public Plugin:myinfo =
{
	name = "Be the Vagineer",
	author = "svaugrasn",
	description = "HAMALUM",
	version = PLUGIN_VERSION,
	url = ""
}

new bool:isVagineer[MAXPLAYERS + 1] = { false, ... };
new String:voicemenu1[4];
new String:voicemenu2[4];

public OnPluginStart()
{
	RegConsoleCmd("vagineer", BetheVagineer);
	RegConsoleCmd("voicemenu", Command_Voicemenu);
	AddNormalSoundHook(HookSound);
}

public OnMapStart()
{
	AddFileToDownloadsTable("models/player/saxton_hale/vagineer_v134.dx80.vtx");
	AddFileToDownloadsTable("models/player/saxton_hale/vagineer_v134.dx90.vtx");
	AddFileToDownloadsTable("models/player/saxton_hale/vagineer_v134.mdl");
	AddFileToDownloadsTable("models/player/saxton_hale/vagineer_v134.sw.vtx");
	AddFileToDownloadsTable("models/player/saxton_hale/vagineer_v134.vvd");

	AddFileToDownloadsTable("sound/misc/vagineer/engineer_battlecry01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_battlecry03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_battlecry04.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_battlecry06.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_battlecry07.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_cheers02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_cheers07.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_go01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_goodjob01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_headleft01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_headright03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_helpme01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_helpme02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_helpme03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_incoming01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_incoming02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_incoming03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_jeers01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_jeers02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_jeers03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_laughlong01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_laughlong02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_medic01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_medic02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_medic03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_moveup01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_needdispenser01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_negativevocalization12.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_no01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_no02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_no03.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_paincrticialdeath01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_thanks01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_yes01.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_yes02.mp3");
	AddFileToDownloadsTable("sound/misc/vagineer/engineer_yes03.mp3");

	PrecacheSound("misc/vagineer/engineer_battlecry01.mp3");
	PrecacheSound("misc/vagineer/engineer_battlecry03.mp3");
	PrecacheSound("misc/vagineer/engineer_battlecry04.mp3");
	PrecacheSound("misc/vagineer/engineer_battlecry06.mp3");
	PrecacheSound("misc/vagineer/engineer_battlecry07.mp3");
	PrecacheSound("misc/vagineer/engineer_cheers02.mp3");
	PrecacheSound("misc/vagineer/engineer_cheers07.mp3");
	PrecacheSound("misc/vagineer/engineer_go01.mp3");
	PrecacheSound("misc/vagineer/engineer_goodjob01.mp3");
	PrecacheSound("misc/vagineer/engineer_headleft01.mp3");
	PrecacheSound("misc/vagineer/engineer_headright03.mp3");
	PrecacheSound("misc/vagineer/engineer_helpme01.mp3");
	PrecacheSound("misc/vagineer/engineer_helpme02.mp3");
	PrecacheSound("misc/vagineer/engineer_helpme03.mp3");
	PrecacheSound("misc/vagineer/engineer_incoming01.mp3");
	PrecacheSound("misc/vagineer/engineer_incoming02.mp3");
	PrecacheSound("misc/vagineer/engineer_incoming03.mp3");
	PrecacheSound("misc/vagineer/engineer_jeers01.mp3");
	PrecacheSound("misc/vagineer/engineer_jeers02.mp3");
	PrecacheSound("misc/vagineer/engineer_jeers03.mp3");
	PrecacheSound("misc/vagineer/engineer_laughlong01.mp3");
	PrecacheSound("misc/vagineer/engineer_laughlong02.mp3");
	PrecacheSound("misc/vagineer/engineer_medic01.mp3");
	PrecacheSound("misc/vagineer/engineer_medic02.mp3");
	PrecacheSound("misc/vagineer/engineer_medic03.mp3");
	PrecacheSound("misc/vagineer/engineer_moveup01.mp3");
	PrecacheSound("misc/vagineer/engineer_needdispenser01.mp3");
	PrecacheSound("misc/vagineer/engineer_negativevocalization12.mp3");
	PrecacheSound("misc/vagineer/engineer_no01.mp3");
	PrecacheSound("misc/vagineer/engineer_no02.mp3");
	PrecacheSound("misc/vagineer/engineer_no03.mp3");
	PrecacheSound("misc/vagineer/engineer_paincrticialdeath01.mp3");
	PrecacheSound("misc/vagineer/engineer_thanks01.mp3");
	PrecacheSound("misc/vagineer/engineer_yes01.mp3");
	PrecacheSound("misc/vagineer/engineer_yes02.mp3");
	PrecacheSound("misc/vagineer/engineer_yes03.mp3");

}

public Action:BetheVagineer(client, args)
{

	if (!isVagineer[client])
	{
		// SPAWN SOUND
		EmitSoundToAll("misc/vagineer/engineer_laughlong01.mp3");

		// SPAWN CHAT
		new String:name[MAX_NAME_LENGTH];
		GetClientName(client, name, sizeof(name));

		// SET MODEL
		new String:Mdl[PLATFORM_MAX_PATH];
		Format(Mdl, sizeof(Mdl), "models/player/saxton_hale/vagineer_v134.mdl", Mdl, Mdl);
		PrecacheModel(Mdl);
		SetVariantString(Mdl);
		AcceptEntityInput(client, "SetCustomModel");
		SetEntProp(client, Prop_Send, "m_bUseClassAnimations", 1);
		SetEntPropFloat(client, Prop_Send, "m_flModelScale", 1.00);

		isVagineer[client] = true;
	}

}

public Action:Command_Voicemenu(client, args)
{
	if(isVagineer[client])
	{

		new rint = GetRandomInt(0,2);
		GetCmdArg(1, voicemenu1, sizeof(voicemenu1));
		GetCmdArg(2, voicemenu2, sizeof(voicemenu2));

		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 0)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_medic01.mp3", client);
				}
				if(rint == 1){
				EmitSoundToAll("misc/vagineer/engineer_medic02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_medic03.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 1)
			{
				EmitSoundToAll("misc/vagineer/engineer_thanks01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 2)
			{
				EmitSoundToAll("misc/vagineer/engineer_go01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 3)
			{
				EmitSoundToAll("misc/vagineer/engineer_moveup01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 4)
			{
				EmitSoundToAll("misc/vagineer/engineer_headleft01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 5)
			{
				EmitSoundToAll("misc/vagineer/engineer_headright03.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 6)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_yes01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_yes02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_yes03.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 0)
		{
			if(StringToInt(voicemenu2) == 7)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_no01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_no02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_no03.mp3", client);
				}
			}
		}

		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 0)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_incoming01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_incoming02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_incoming03.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 1)
			{
				EmitSoundToAll("misc/vagineer/engineer_jeers01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 2)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_jeers02.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_battlecry01.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_battlecry04.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 3)
			{
				EmitSoundToAll("misc/vagineer/engineer_needdispenser01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 4)
			{
				EmitSoundToAll("misc/vagineer/engineer_needdispenser01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 5)
			{
				EmitSoundToAll("misc/vagineer/engineer_needdispenser01.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 6)
			{
				EmitSoundToAll("misc/vagineer/engineer_cheers02.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 1)
		{
			if(StringToInt(voicemenu2) == 7)
			{
				EmitSoundToAll("misc/vagineer/engineer_laughlong01.mp3", client);
			}
		}

		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 0)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_helpme01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_helpme02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_helpme03.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 1)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_battlecry01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_battlecry03.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_battlecry04.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 2)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_battlecry06.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_battlecry07.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_cheers02.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 3)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_jeers01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_jeers02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_jeers03.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 4)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_laughlong01.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_battlecry07.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_cheers02.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 5)
			{
				if(rint == 0){
					EmitSoundToAll("misc/vagineer/engineer_negativevocalization12.mp3", client);
				}
				if(rint == 1){
					EmitSoundToAll("misc/vagineer/engineer_jeers02.mp3", client);
				}
				if(rint == 2){
					EmitSoundToAll("misc/vagineer/engineer_jeers01.mp3", client);
				}
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 6)
			{
				EmitSoundToAll("misc/vagineer/engineer_cheers02.mp3", client);
			}
		}
		if(StringToInt(voicemenu1) == 2)
		{
			if(StringToInt(voicemenu2) == 7)
			{
				EmitSoundToAll("misc/vagineer/engineer_goodjob01.mp3", client);
			}
		}
	}
}

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 (isVagineer[ent])
	{
		volume = 0.0;
		return Plugin_Changed;
	}

	return Plugin_Continue;

}

public Action:event_class_change(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	isVagineer[client] = false;
}

public OnClientDisconnect(client)
{
	isVagineer[client] = false;
}

Posted by at 2013/8/25 0:13

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

タグ

最近投稿されたコード