You are not logged in.

[TF2] Crits 4 All

Dear visitor, welcome to sourceserver.info. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Newbie'

Unregistered

1

Tuesday, September 18th 2012, 1:01pm

Crits 4 All

Hallo,

Ich habe mir gerade folgendes Sourcemod Plugin auf meinen TF2 Gameserver geladen: hier
Dieses nutzt dazu noch die EXTENSION Dukehacks.

Gibt es noch eine Version von Dukehacks die derzeit problemlos funktioniert ?
Wenn nicht wäre es möglich wenn mir jemand das Plugin so umschreiben könnte das es mit SDKHooks läuft ?

Hier noch ein paar Informationen zum Server:

sm plugins list

Spoiler Spoiler

[SM] Listing 20 plugins:
01 "Basic Votes" (1.4.7-dev) by AlliedModders LLC
02 "Admin Help" (1.4.7-dev) by AlliedModders LLC
03 "Basic Commands" (1.4.7-dev) by AlliedModders LLC
04 "Nextmap" (1.4.7-dev) by AlliedModders LLC
05 "[TF2] Fast Respawns" (1.0.6) by WoZeR
06 "Fun Votes" (1.4.7-dev) by AlliedModders LLC
07 "Player Commands" (1.4.7-dev) by AlliedModders LLC
08 "Client Preferences" (1.4.7-dev) by AlliedModders LLC
09 "Basic Info Triggers" (1.4.7-dev) by AlliedModders LLC
10 "Fun Commands" (1.4.7-dev) by AlliedModders LLC
11 "Basic Comm Control" (1.4.7-dev) by AlliedModders LLC
12 "Admin Menu" (1.4.7-dev) by AlliedModders LLC
13 "Basic Chat" (1.4.7-dev) by AlliedModders LLC
14 "[TF2Items] Manager" (1.4.1) by Damizean & Asherkin
15 "Admin File Reader" (1.4.7-dev) by AlliedModders LLC
16 "Sound Commands" (1.4.7-dev) by AlliedModders LLC
18 "Anti-Flood" (1.4.7-dev) by AlliedModders LLC
19 "Basic Ban Commands" (1.4.7-dev) by AlliedModders LLC
20 "Reserved Slots" (1.4.7-dev) by AlliedModders LLC



rcon sm exts list

Spoiler Spoiler

[SM] Displaying 10 extensions:
[01] Automatic Updater (1.4.7-dev): Updates SourceMod gamedata files
[02] Webternet (1.4.7-dev): Extension for interacting with URLs
[03] TF2Items (1.5.2): TF2 Item Modifier
[04] TF2 Tools (1.4.7-dev): TF2 extended functionality
[05] BinTools (1.4.7-dev): Low-level C/C++ Calling API
[06] Top Menus (1.4.7-dev): Creates sorted nested menus
[07] SDK Tools (1.4.7-dev): Source SDK Tools
[08] Client Preferences (1.4.7-dev): Saves client preference settings
[09] SQLite (1.4.7-dev): SQLite Driver
[10] <FAILED> file "dukehacks.ext.so": vstdlib_i486.so: cannot open shared object file: No such file or directory


Error-Logs:

Spoiler Spoiler

[SM] Plugin crits4all.smx failed to load: Required extension "Dukehacks Extension" file("dukehacks.ext") not running.


mfg,
Newbie'

Jackmaster

Super Moderator

Posts: 660

wcf.user.option.userOption53: Ja

  • Send private message

2

Tuesday, September 18th 2012, 5:00pm

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma semicolon 1

#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

public Plugin:myinfo = {
	name = "crits4all",
	author = "EnigmatiK, edit Jackmaster",
	description = "Shows crits from other players.",
	version = "1.0.1",
	url = "http://http.www.com/"
}

new Handle:cvar_onlytoteam;

public OnPluginStart() {
	CreateConVar("crits_version", "1.0", "Version of crits4all plugin.", FCVAR_PLUGIN | FCVAR_SPONLY | FCVAR_NOTIFY);
	cvar_onlytoteam = CreateConVar("crits_onlytoteam", "1", "Only shows Critical Hits to teammates.", FCVAR_PLUGIN, true, 0.0, true, 1.0);
	for (new i = 1; i <= MaxClients; i++)
	{
		if (IsClientInGame(i))
		{
			SDKHook(i, SDKHook_OnTakeDamage, OnTakeDamage);
		}
	}
}

public OnClientPutInServer(client)
{
	SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action:OnTakeDamage(client, &attacker, &inflictor, &Float:damage, &damagetype){
	if ((damagetype & DMG_ACID) && 0 < attacker <= MaxClients && client != attacker) {
		new particle = CreateEntityByName("info_particle_system");
		if (IsValidEdict(particle)) {
			new particles = FindStringTable("ParticleEffectNames");
			new i, count = GetStringTableNumStrings(particles);
			decl String:tmp[11];
			for (i = 0; i < count; i++) {
				ReadStringTable(particles, i, tmp, sizeof(tmp));
				if (StrEqual(tmp, "crit_text", false)) break;
			}
			TE_Start("TFParticleEffect");
			decl Float:pos[3];
			GetClientEyePosition(client, pos);
			pos[2] += 4.0;
			TE_WriteFloat("m_vecOrigin[0]", pos[0]);
			TE_WriteFloat("m_vecOrigin[1]", pos[1]);
			TE_WriteFloat("m_vecOrigin[2]", pos[2]);
			TE_WriteNum("m_iParticleSystemIndex", i);
			TE_WriteNum("m_bResetParticles", true);
			decl clients[MaxClients];
			new num;
			for (new j = 1; j <= MaxClients; j++) {
				if (IsClientConnected(j) && IsClientInGame(j)) {
					if (!GetConVarBool(cvar_onlytoteam) || GetClientTeam(j) == GetClientTeam(attacker)) {
						if (j != attacker) clients[num++] = j;
					}
				}
			}
			TE_Send(clients, num);
		}
	}
	return Plugin_Continue;
}