Raised This Month: $51 Target: $400
 12% 

Tf2ware fix.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 06-29-2012 , 12:38   Tf2ware fix.
Reply With Quote #1

Hello guys,
I need help getting my tf2ware server back up(since the update screwed it up)....
I could post this in the thread but i want to fix it and the thread is no longer active.

Here's the error:
Code:
L 06/28/2012 - 19:00:28: [SM] Native "EquipPlayerWeapon" reported: NULL not allowed
L 06/28/2012 - 19:00:28: [SM] Displaying call stack trace for plugin "mw_tf2ware.smx":
L 06/28/2012 - 19:00:28: [SM]   [0]  Line 225, E:\Projects\SourceMod\General\tf2ware\public\scripting\include\tf2ware\mw_tf2ware_features.inc::GiveClientWeapon()
L 06/28/2012 - 19:00:28: [SM]   [1]  Line 325, E:\Projects\SourceMod\General\tf2ware\public\scripting\include\tf2ware\mw_tf2ware_features.inc::DisableClientWeapons()
L 06/28/2012 - 19:00:28: [SM]   [2]  Line 589, E:\Projects\SourceMod\General\tf2ware\public\scripting\mw_tf2ware.sp::EventInventoryApplication()
Here's the GiveClientWeapon() code:
PHP Code:
public Action:GiveClientWeapon(clientString:weapon[128], slotbool:input) {
    if (
IsValidClient(client) && IsPlayerAlive(client)) {
        
TF2_RemoveWeaponSlot(clientslot);
        
        new 
wpn SDKCall(hGiveNamedItemclientweapon00);
        
EquipPlayerWeapon(clientwpn);
        
        
SetClientSlot(clientslot);

        if (
input == true) {
            if (
StrEqual(weapon"tf_weapon_revolver")) SetWeaponAmmo(client624);
            if (
StrEqual(weapon"tf_weapon_shotgun_primary")) SetWeaponAmmo(client632);
            if (
StrEqual(weapon"tf_weapon_flamethrower")) SetWeaponAmmo(client200200);
            if (
StrEqual(weapon"tf_weapon_grenadelauncher")) SetWeaponAmmo(client416);
            if (
StrEqual(weapon"tf_weapon_syringegun_medic")) SetWeaponAmmo(client40150);
            if (
StrEqual(weapon"tf_weapon_sniperrifle")) SetWeaponAmmo(client2525);
            if (
StrEqual(weapon"tf_weapon_rocketlauncher")) SetWeaponAmmo(client420);
            if (
StrEqual(weapon"tf_weapon_pipebomblauncher")) SetWeaponAmmo(client824);
        }
        
        
// Create a model everyone else can oodle at
        
RemoveFakeWeapon(client);
        
        
decl String:strModel[PLATFORM_MAX_PATH];
        
Format(strModelsizeof(strModel), "");
        
        if (
StrEqual(weapon"tf_weapon_bat")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_bat.mdl");
        if (
StrEqual(weapon"tf_weapon_minigun")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_minigun.mdl");
        if (
StrEqual(weapon"tf_weapon_bonesaw")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_bonesaw.mdl");
        if (
StrEqual(weapon"tf_weapon_wrench")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_wrench.mdl");
        if (
StrEqual(weapon"tf_weapon_bottle")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_bottle.mdl");
        if (
StrEqual(weapon"tf_weapon_club")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_club.mdl");
        if (
StrEqual(weapon"tf_weapon_fireaxe")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_fireaxe.mdl");
        if (
StrEqual(weapon"tf_weapon_shovel")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_shovel.mdl");
        if (
StrEqual(weapon"tf_weapon_revolver")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_revolver.mdl");
        if (
StrEqual(weapon"tf_weapon_shotgun_primary")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_shotgun.mdl");
        if (
StrEqual(weapon"tf_weapon_flamethrower")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_flamethrower.mdl");
        if (
StrEqual(weapon"tf_weapon_grenadelauncher")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_grenadelauncher.mdl");
        if (
StrEqual(weapon"tf_weapon_syringegun_medic")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_syringegun.mdl");
        if (
StrEqual(weapon"tf_weapon_sniperrifle")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_sniperrifle.mdl");
        if (
StrEqual(weapon"tf_weapon_rocketlauncher")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_rocketlauncher.mdl");
        if (
StrEqual(weapon"tf_weapon_pipebomblauncher")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_stickybomb_launcher.mdl");
        if (
StrEqual(weapon"tf_weapon_medigun")) Format(strModelsizeof(strModel), "models/weapons/w_models/w_medigun.mdl");
        
        if (!
StrEqual(strModel"")) {
            
#if defined ENABLE_ATTACHMENTS
            
new iEntity Attachable_CreateAttachable(client);
            if (
iEntity && IsValidEdict(iEntity)) {
                
                
SetEntityModel(iEntitystrModel);
                
g_PlayerVisibleWeapon[client] = iEntity;
            }
            
#endif
        
}
        
        
        
SetWeaponState(clientinput);
    }

All i need to know is if this is fixable and if it is how do i fix it.
Sorry if i posted this in the wrong section.
tf2ware thread: http://forums.alliedmods.net/showthread.php?t=148317/

Thanks,
Gamemann
__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!

Last edited by gamemann; 06-29-2012 at 12:39.
gamemann is offline
Send a message via Skype™ to gamemann
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-29-2012 , 13:22   Re: Tf2ware fix.
Reply With Quote #2

My understanding is that Mecha the Slag is currently working on TF2Ware 2, which was mentioned 6 weeks ago.

Then again, this is the same person who, having not completed that, has apparently started porting Super Monday Night Combat to TF2.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-29-2012 at 13:26.
Powerlord is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-29-2012 , 14:46   Re: Tf2ware fix.
Reply With Quote #3

Quote:
Originally Posted by Powerlord View Post
Then again, this is the same person who, having not completed that, has apparently started porting Super Monday Night Combat to TF2.
Aww, I was gonna do that.
__________________
asherkin is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-29-2012 , 15:00   Re: Tf2ware fix.
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
Aww, I was gonna do that.
He beat you to it with both the Megabeth model and Robot Fortress plugin he's working on.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-29-2012 at 15:01.
Powerlord is offline
gamemann
Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
Old 06-30-2012 , 15:01   Re: Tf2ware fix.
Reply With Quote #5

Anybody?
Some people say it's the game data file and i tried some offsets but none of them work.
Here is the game data file for it:
PHP Code:

"Games"
{
    
/* Team Fortress 2 */
    
"tf"
    
{
        
"Offsets"
        
{
            
"EquipWearable"
            
{
                
"windows"    "417"
                "linux"        "418"
            
}
            
"RemoveWearable"
            
{
                
"windows"    "419"
                "linux"        "419"
            
}
            
"GiveNamedItem"
            
{
                
"windows"    "464"
                "linux"        "464"
            
}
            
            
"WeaponEquip"
            
{
                
"windows"    "254"
                "linux"        "255" 
            
}
            
"RemoveAllWeapons"
            
{
                
"windows"    "296"
                "linux"        "297"
            
}
                  
"GrenadeDetonate"
                  
{
                        
"windows"    "213"
                        "linux"           "214"
                  
}
            }
    }

__________________
Software/network engineer. I often work on a neat project called The Modding Community.

Check out my GitHub here!
gamemann is offline
Send a message via Skype™ to gamemann
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 07-03-2012 , 22:38   Re: Tf2ware fix.
Reply With Quote #6

I attempted to change the offsets to the same as TF2Items but that simply results in a server crash, I saw GFL's server is back up and am curious as of how to fix this as-well.
ReFlexPoison is offline
Tylerst
Veteran Member
Join Date: Oct 2010
Old 07-04-2012 , 01:57   Re: Tf2ware fix.
Reply With Quote #7

Try these:
PHP Code:
"Games"
{
    
"tf"
    
{
        
"Offsets"
        
{
            
"EquipWearable"
            
{
                
"windows"    "419"
                "linux"        "420"
                "mac"        "420"
            
}
            
"RemoveWearable"
            
{
                
"windows"    "420"
                "linux"        "421"
                "mac"        "421"
            
}
            
"GiveNamedItem"
            
{
                
"windows"    "464"
                "linux"        "471"
                "mac"        "471"
            
}            
            
"WeaponEquip"
            
{
                
"windows"    "256"
                "linux"        "257"
                "mac"        "257"
            
}
            
"RemoveAllWeapons"
            
{
                
"windows"    "298"
                "linux"        "299"
                "mac"        "299"
            
}
            
"GrenadeDetonate"
            
{
                
"windows"    "214"
                "linux"        "215"
                "mac"        "215"
            
}
        }
    }

Made from linux offsets, but windows is generally 1 less, I'm defering to TF2items on GiveNamedItem though.

Last edited by Tylerst; 07-04-2012 at 02:09.
Tylerst is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 07-04-2012 , 04:06   Re: Tf2ware fix.
Reply With Quote #8

Quote:
Originally Posted by Tylerst View Post
Try these:
PHP Code:
"Games"
{
    
"tf"
    
{
        
"Offsets"
        
{
            
"EquipWearable"
            
{
                
"windows"    "419"
                "linux"        "420"
                "mac"        "420"
            
}
            
"RemoveWearable"
            
{
                
"windows"    "420"
                "linux"        "421"
                "mac"        "421"
            
}
            
"GiveNamedItem"
            
{
                
"windows"    "464"
                "linux"        "471"
                "mac"        "471"
            
}            
            
"WeaponEquip"
            
{
                
"windows"    "256"
                "linux"        "257"
                "mac"        "257"
            
}
            
"RemoveAllWeapons"
            
{
                
"windows"    "298"
                "linux"        "299"
                "mac"        "299"
            
}
            
"GrenadeDetonate"
            
{
                
"windows"    "214"
                "linux"        "215"
                "mac"        "215"
            
}
        }
    }

Made from linux offsets, but windows is generally 1 less, I'm defering to TF2items on GiveNamedItem though.
nope =/ changed those and still results in server freezing as soon as player joins.
ReFlexPoison is offline
RavensBro
Veteran Member
Join Date: Sep 2009
Location: Wisonsin USA
Old 07-04-2012 , 11:14   Re: Tf2ware fix.
Reply With Quote #9

"Games"
{
/* Team Fortress 2 */
"tf"
{
"Offsets"
{
"EquipWearable"
{
"windows" "419"
"linux" "420"
}
"RemoveWearable"
{
"windows" "420"
"linux" "421"
}
"GiveNamedItem"
{
"windows" "393"
"linux" "394"
}
"WeaponEquip"
{
"windows" "256"
"linux" "257"
}
}
}
}
Attached Files
File Type: txt mechatheslag_global.txt (375 Bytes, 80 views)

Last edited by RavensBro; 07-04-2012 at 11:16.
RavensBro is offline
Reply



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


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