Raised This Month: $32 Target: $400
 8% 

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 02-23-2012 , 05:37   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1801

Nope it isn't just you, I getting problems with sdkhooks too. but the routine is:
  1. it crashes?
  2. delete gamedata files and use an old backup.
  3. autoupdater notices the old files and updates them.
  4. server should be running again.
  5. if it isn't repeat at step 2.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]

Last edited by Chanz; 02-23-2012 at 05:40.
Chanz is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-23-2012 , 05:45   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1802

As the update message says, you need to restart the server after it auto-updates the gamedata.
That's probably all your problem is.

Quote:
Originally Posted by Chanz View Post
Nope it isn't just you, I getting problems with sdkhooks too. but the routine is:
  1. it crashes?
  2. delete gamedata files and use an old backup.
  3. autoupdater notices the old files and updates them.
  4. server should be running again.
  5. if it isn't repeat at step 2.
The autoupdater just hash checks the files, if they don't match what's on the AM server they get replaced.
__________________
asherkin is offline
Chanz
Veteran Member
Join Date: Aug 2008
Location: Germany - Stuttgart
Old 02-23-2012 , 07:03   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1803

Yeah but my servers are all restarting at 5 am (gmt+1), still once a month a server just crashes upon start. Most times I need to replace sdkhooks gamedata files with an old copy so the server can start up and get the new files from the AM server.

I came up with the idea to run a cronjob 5 minutes sooner to check for new gamedata files, download them if needed and copy it over to each server. Benefits from that would be that I could disable the autoupdater for gamedata files and the files are always up to date, even when the server crashed when starting.

But if you got a better solution or how I/we can resolve this issue, I'd rather try that.
__________________
[ SourceModPlugins.org ][ My Plugins ]

Thank you for donations: [ Paypal ]

Video Tutorial (German): [ Gameserver & SourceMod Plugins mit HLSW verwalten ]
Chanz is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 02-23-2012 , 17:59   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1804

Ok, I did test on Linux. Removing sdkhooks total, reboot server.
Install sdkhooks linux files from first post, move all SM plugins in disabled folder, reboot.
Now it updated normally without problem.
Don't know what was problem in first time, gone now.
Bacardi is offline
turtsmcgurts
SourceMod Donor
Join Date: Jul 2011
Old 03-13-2012 , 21:24   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1805

Any chances this hook can be put into SDKHooks?

https://forums.alliedmods.net/showthread.php?t=180146

TF2 has been lacking a proper "OnFire" event since release, this would be just perfect. The few of us trying to create an Accuracy stat are forced to use hacky-solutions to determine how many bullets a person fires.
turtsmcgurts is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-13-2012 , 22:06   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1806

Quote:
Originally Posted by turtsmcgurts View Post
Any chances this hook can be put into SDKHooks?
Probably not gonna bother.

Quote:
Originally Posted by turtsmcgurts View Post
TF2 has been lacking a proper "OnFire" event since release, this would be just perfect.
It's not if you read the whole thread. That function and many other similar ones that would catch shots have various drawbacks to them that make them no better overall than what's already available.
psychonic is offline
DarkSynergy
Member
Join Date: Jan 2011
Old 03-14-2012 , 17:50   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1807

I'm getting crashes when I try to block the dropping (SDKHook_WeaponDrop) of a L4D2 gnome/gascan/oxygentank/propanetank/fireworkscrate. I seem to be able to prevent the dropping of normal weapons, so I'm wondering if this is a problem hardcoded into the game or if there is a way to get around it.
DarkSynergy is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 03-20-2012 , 16:31   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1808

Sorry if this has already been asked before (searched the thread, found nothing) but when is OnStartTouch exactly fired? Upon contact with a model's bounding box or with its collision mesh(hitbox)?
__________________
napalm00 is offline
RavensBro
Veteran Member
Join Date: Sep 2009
Location: Wisonsin USA
Old 03-30-2012 , 05:03   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1809

hi guys ok i run a multi mod server and one of the things on there is tf2ware now after one of the last updates the snipertarget don't work any more what do i need to change to make it work again here is file.
Thanks for any help.

new var_sniper_target = -1;
// NEED TO MODIFY SO THAT IT IS A SHOOTING RANGE
#define SNIPER_TARGET "models/props_training/target_heavy.mdl"
#define SNIPER_BASEPOS 160
new g_Target_Pos = 0;
new g_Target_Random = 0;
new bool:g_Target_Ready = false;
public SniperTarget_Init() {
AddToForward(g_OnMapStart, INVALID_HANDLE, SniperTarget_OnMapStart);
}
public SniperTarget_OnMapStart() {
PrecacheModel(SNIPER_TARGET, true);
}
public SniperTarget_OnMinigame() {
AddToForward(g_justEntered, INVALID_HANDLE, SniperTarget_justEntered);
AddToForward(g_OnEndMinigame, INVALID_HANDLE, SniperTarget_End);
AddToForward(g_OnTimerMinigame, INVALID_HANDLE, SniperTarget_TimerMinigame);
AddToForward(g_OnGameFrame_Minigames, INVALID_HANDLE, SniperTarget_OnGameFrame);
g_attack = true;

g_Target_Random = GetRandomInt(0,4);
g_Target_Pos = 0;
g_Target_Ready = false;
}
public SniperTarget_TimerMinigame(timer) {
if (timer == 6) {
var_sniper_target = CreateEntityByName("prop_physics");

if (IsValidEdict(var_sniper_target)) {
decl String:model[128];
Format(model, sizeof(model), SNIPER_TARGET);

DispatchKeyValue(var_sniper_target, "model", model);
DispatchSpawn(var_sniper_target);
SetEntityMoveType(var_sniper_target, MOVETYPE_NONE);

SDKHook(var_sniper_target, SDKHook_OnTakeDamage, SniperTarget_Hurt2);

g_Target_Ready = true;

Sniper_SetPos();
}
}
if (timer == 2) {
g_Target_Ready = false;
}
}
Sniper_SetPos() {
decl Float:pos[3];
decl Float:ang[3];
ang[0] = 0.0;
ang[1] = 270.0;
ang[2] = 0.0;

pos[2] = float(SNIPER_BASEPOS + g_Target_Pos);

if (g_Target_Random == 0) {
pos[0] = 3338.0;
pos[1] = 2223.0;
}
if (g_Target_Random == 1) {
pos[0] = 4119.0;
pos[1] = 2240.0;
}
if (g_Target_Random == 2) {
pos[0] = 3690.0;
pos[1] = 2326.0;
}
if (g_Target_Random == 3) {
pos[0] = 3226.0;
pos[1] = 2501.0;
}
if (g_Target_Random == 4) {
pos[0] = 4191.0;
pos[1] = 2558.0;
}

if (IsValidEdict(var_sniper_target)) TeleportEntity(var_sniper_target, pos, ang, NULL_VECTOR);
}
public SniperTarget_OnGameFrame() {
if (g_Target_Ready && g_Target_Pos < 100) {
g_Target_Pos += 6;
Sniper_SetPos();
}
if (g_Target_Ready == false && g_Target_Pos > 0) {
g_Target_Pos -= 6;
Sniper_SetPos();
}
}
public SniperTarget_End() {
if (var_sniper_target >= 0 && IsValidEntity(var_sniper_target)) {
SDKUnhook(var_sniper_target, SDKHook_OnTakeDamage, SniperTarget_Hurt2);
AcceptEntityInput(var_sniper_target, "Kill" );
var_sniper_target = -1;
}
for (new i = 1; i <= MaxClients; i++) {
SDKUnhook(i, SDKHook_OnTakeDamage, SniperTarget_Hurt);
}
}
public Action:SniperTarget_Hurt(victim, &attacker, &inflictor, &Float:damage, &damagetype) {
damage = 0.0;
return Plugin_Changed;
}
public Action:SniperTarget_Hurt2(victim, &attacker, &inflictor, &Float:damage, &damagetype) {
damage = 0.0;
if (IsValidClient(attacker)) SetStateClient(attacker, true, true);
return Plugin_Changed;
}
public SniperTarget_justEntered(client) {
if (IsValidClient(client)) {
RemoveClientWeapons(client);
SetClientClass(client, "sniper");
GiveClientWeapon(client, "tf_weapon_sniperrifle", 0, true);
SetClientClass(client, "sniper");

decl Float:vel[3];
vel[0] = 0.0;
vel[1] = 0.0;
vel[2] = 0.0;

new column = client;
new row = 0;
while (column > 24) {
column = column - 24;
row = row + 1;
}

decl Float:pos[3];
pos[0] = 2958.0 + float(column*55);
pos[1] = 806.0 - float(row*55);
pos[2] = 270.0;
decl Float:ang[3];
ang[0] = 0.0;
ang[1] = 90.0;
ang[2] = 0.0;
TeleportEntity(client, pos, ang, vel);

// No damage
SDKHook(client, SDKHook_OnTakeDamage, SniperTarget_Hurt);
}
}
Attached Files
File Type: inc snipertarget.inc (4.3 KB, 100 views)

Last edited by RavensBro; 03-30-2012 at 05:04.
RavensBro is offline
kamild1996
Senior Member
Join Date: May 2011
Old 03-31-2012 , 07:48   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1810

Not working.
Quote:
sm exts list
[SM] Displaying 7 extensions:
[01] Automatic Updater (1.4.0): Updates SourceMod gamedata files
[02] Webternet (1.4.0): Extension for interacting with URLs
[03] CS:S Tools (1.4.0): CS:S extended functionality
[04] BinTools (1.4.0): Low-level C/C++ Calling API
[05] SDK Tools (1.4.0): Source SDK Tools
[06] Top Menus (1.4.0): Creates sorted nested menus
[07] <FAILED> file "sdkhooks.ext.dll": The module speficied can not be found.
Using newest Metamod, Sourcemod and Windows XP.
kamild1996 is offline
Closed Thread


Thread Tools
Display Modes

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 02:17.


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