Veteran Member
Join Date: Sep 2009
Location: Mullica Hill, New Jersey
|
06-29-2012
, 12:38
Tf2ware fix.
|
#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(client, String:weapon[128], slot, bool:input) { if (IsValidClient(client) && IsPlayerAlive(client)) { TF2_RemoveWeaponSlot(client, slot); new wpn = SDKCall(hGiveNamedItem, client, weapon, 0, 0); EquipPlayerWeapon(client, wpn); SetClientSlot(client, slot);
if (input == true) { if (StrEqual(weapon, "tf_weapon_revolver")) SetWeaponAmmo(client, 6, 24); if (StrEqual(weapon, "tf_weapon_shotgun_primary")) SetWeaponAmmo(client, 6, 32); if (StrEqual(weapon, "tf_weapon_flamethrower")) SetWeaponAmmo(client, 200, 200); if (StrEqual(weapon, "tf_weapon_grenadelauncher")) SetWeaponAmmo(client, 4, 16); if (StrEqual(weapon, "tf_weapon_syringegun_medic")) SetWeaponAmmo(client, 40, 150); if (StrEqual(weapon, "tf_weapon_sniperrifle")) SetWeaponAmmo(client, 25, 25); if (StrEqual(weapon, "tf_weapon_rocketlauncher")) SetWeaponAmmo(client, 4, 20); if (StrEqual(weapon, "tf_weapon_pipebomblauncher")) SetWeaponAmmo(client, 8, 24); } // Create a model everyone else can oodle at RemoveFakeWeapon(client); decl String:strModel[PLATFORM_MAX_PATH]; Format(strModel, sizeof(strModel), ""); if (StrEqual(weapon, "tf_weapon_bat")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_bat.mdl"); if (StrEqual(weapon, "tf_weapon_minigun")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_minigun.mdl"); if (StrEqual(weapon, "tf_weapon_bonesaw")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_bonesaw.mdl"); if (StrEqual(weapon, "tf_weapon_wrench")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_wrench.mdl"); if (StrEqual(weapon, "tf_weapon_bottle")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_bottle.mdl"); if (StrEqual(weapon, "tf_weapon_club")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_club.mdl"); if (StrEqual(weapon, "tf_weapon_fireaxe")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_fireaxe.mdl"); if (StrEqual(weapon, "tf_weapon_shovel")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_shovel.mdl"); if (StrEqual(weapon, "tf_weapon_revolver")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_revolver.mdl"); if (StrEqual(weapon, "tf_weapon_shotgun_primary")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_shotgun.mdl"); if (StrEqual(weapon, "tf_weapon_flamethrower")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_flamethrower.mdl"); if (StrEqual(weapon, "tf_weapon_grenadelauncher")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_grenadelauncher.mdl"); if (StrEqual(weapon, "tf_weapon_syringegun_medic")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_syringegun.mdl"); if (StrEqual(weapon, "tf_weapon_sniperrifle")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_sniperrifle.mdl"); if (StrEqual(weapon, "tf_weapon_rocketlauncher")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_rocketlauncher.mdl"); if (StrEqual(weapon, "tf_weapon_pipebomblauncher")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_stickybomb_launcher.mdl"); if (StrEqual(weapon, "tf_weapon_medigun")) Format(strModel, sizeof(strModel), "models/weapons/w_models/w_medigun.mdl"); if (!StrEqual(strModel, "")) { #if defined ENABLE_ATTACHMENTS new iEntity = Attachable_CreateAttachable(client); if (iEntity > 0 && IsValidEdict(iEntity)) { SetEntityModel(iEntity, strModel); g_PlayerVisibleWeapon[client] = iEntity; } #endif } SetWeaponState(client, input); } }
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
__________________
Last edited by gamemann; 06-29-2012 at 12:39.
|
|