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

TF2Items - Items with custom attributes.


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Steveh
Member
Join Date: Oct 2010
Old 08-05-2011 , 06:07   Re: TF2Items - Items with custom attributes.
#1081

Hi, I am getting this in my Server's Error Logs:

PHP Code:
  L 08/04/2011 21:35:51: [SMNative "TF2Items_GiveNamedItem" reportedItem is NULLFile a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
  
L 08/04/2011 21:35:51: [SMDisplaying call stack trace for plugin "disabled/saxtonhale.smx":
  
L 08/04/2011 21:35:51: [SM]   [0]  Line 2714D:\Programs\Steam\SteamApps\robokymk2\source 2007 dedicated server\tf\addons\sourcemod\scripting\saxtonhale\saxtonhale.sp::SpawnWeapon()
  
L 08/04/2011 21:35:51: [SM]   [1]  Line 1464D:\Programs\Steam\SteamApps\robokymk2\source 2007 dedicated server\tf\addons\sourcemod\scripting\saxtonhale\saxtonhale.sp::MakeNoHale()
  
L 08/04/2011 21:40:14Error log file session closed
These errors started happening when I updated TF2Items.

EDIT: Sorry, just realized this is to do with Versus Saxton Hale Mode.

Last edited by Steveh; 08-05-2011 at 06:08. Reason: Wrong Thread.
Steveh is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-06-2011 , 08:59   Re: TF2Items - Items with custom attributes.
#1082

Quote:
Originally Posted by Velture View Post
[IMG]http://img98.**************/img98/416/cpdustbowl0057.png[/IMG]
WORKS FINE! THX MATE!
Could you post an example on how to do this effect?
Zylius is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 08-06-2011 , 11:12   Re: TF2Items - Items with custom attributes.
#1083

this is just a particle effect "flying gibs" on granade launcher. it just looks like it is on the hand becouse of a taunt.
__________________
Velture is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-07-2011 , 03:38   Re: TF2Items - Items with custom attributes.
#1084

Quote:
Originally Posted by Velture View Post
this is just a particle effect "flying gibs" on granade launcher. it just looks like it is on the hand becouse of a taunt.
You see, I can't get any of the effects working, so if you could post an example with any effect (glowing) that works for you, I could then know whether it's problem in my tf2items.weapons configuration, or there is something wrong with my server.
Zylius is offline
Velture
Senior Member
Join Date: Jan 2011
Location: Poland, Warsaw
Old 08-07-2011 , 06:07   Re: TF2Items - Items with custom attributes.
#1085

post your cfg here and i'll tell you if it is ok.
__________________
Velture is offline
Zylius
SourceMod Donor
Join Date: Nov 2009
Old 08-07-2011 , 08:51   Re: TF2Items - Items with custom attributes.
#1086

Quote:
Originally Posted by Velture View Post
post your cfg here and i'll tell you if it is ok.
Here it's
Code:
"custom_weapons_v3"
{
    "*"//tried using steam id too
    {
        "4"//knife
        {
            "preserve_attributes"    "1"
            
            "1"        "134 ; 17"//particle effect?
        }
        "14"//sniper
        {
            "preserve_attributes"    "1"
            
            "1"        "134 ; 9"//another particle effect?
        } 
    }
}
Zylius is offline
Altomare3
New Member
Join Date: Aug 2011
Old 08-07-2011 , 10:24   Re: TF2Items - Items with custom attributes.
#1087

Here is a .sp file I edited to restrict Backburner/Cowmangler/Bison.
Can somebody compile this into a .smx please? (I know I'm a noob with that sort of things...)

Code:
/* Script generated by SourcePawn IDE */

#pragma semicolon 1

#include <sourcemod>
#include <tf2_stocks>
#include <tf2items>

#define PLUGIN_VERSION "1.0.0.0"

public Plugin:myinfo = 
{
    name = "Blah",
    author = "Cookies",
    description = "Blah",
    version = PLUGIN_VERSION,
    url = "blah.blah/blaah.php"
}

public OnPluginStart()
{
    CreateConVar("Blah_version", PLUGIN_VERSION, "Current Blah version", FCVAR_PLUGIN|FCVAR_NOTIFY|FCVAR_REPLICATED|FCVAR_DONTRECORD);
    HookEvent("post_inventory_application", post_inventory_application);
}

public post_inventory_application(Handle:event, const String:name[], bool:dontBroadast)
{
    new client = GetClientOfUserId(GetEventInt(event, "userid"));
    for (new i = 0; i < 2; i++)
    {
        new weapon = GetPlayerWeaponSlot(client, i);
        if (!IsValidEdict(weapon)) continue;
        new index = GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex");
        switch (index)
        {
            case 441: // mangler, ze rocket lawnchair
            {
                TF2_RemoveWeaponSlot(client, i);
                new Handle:hItem = TF2Items_CreateItem(OVERRIDE_ALL);
                TF2Items_SetClassname(hItem, "tf_weapon_rocketlauncher");
                TF2Items_SetItemIndex(hItem, 18);
                TF2Items_SetQuality(hItem, 0);
                TF2Items_SetLevel(hItem, 0);
                TF2Items_SetNumAttributes(hItem, 0);
                TF2Items_GiveNamedItem(client, hItem);
                new entWeapon = TF2Items_GiveNamedItem(client, hItem);
                CloseHandle(hItem);
                EquipPlayerWeapon(client, entWeapon);
            }
            case 442: // bison, ze shooooootgoooon
            {
                TF2_RemoveWeaponSlot(client, i);
                new Handle:hItem = TF2Items_CreateItem(OVERRIDE_ALL);
                TF2Items_SetClassname(hItem, "tf_weapon_shotgun_soldier");
                TF2Items_SetItemIndex(hItem, 10);
                TF2Items_SetQuality(hItem, 0);
                TF2Items_SetLevel(hItem, 0);
                TF2Items_SetNumAttributes(hItem, 0);
                TF2Items_GiveNamedItem(client, hItem);
                new entWeapon = TF2Items_GiveNamedItem(client, hItem);
                CloseHandle(hItem);
                EquipPlayerWeapon(client, entWeapon);
            }
        case 40: // backburnoob fuck that 
        {
                TF2_RemoveWeaponSlot(client, i);
                new Handle:hItem = TF2Items_CreateItem(OVERRIDE_ALL);
                TF2Items_SetClassname(hItem, "tf_weapon_flamethrower");
                TF2Items_SetItemIndex(hItem, 21);
                TF2Items_SetQuality(hItem, 0);
                TF2Items_SetLevel(hItem, 0);
                TF2Items_SetNumAttributes(hItem, 0);
                TF2Items_GiveNamedItem(client, hItem);
                new entWeapon = TF2Items_GiveNamedItem(client, hItem);
                CloseHandle(hItem);
                EquipPlayerWeapon(client, entWeapon);
            }
        }
    }
}
Thanks, Altomare3
Altomare3 is offline
napalm00
Veteran Member
Join Date: Jun 2011
Location: Italy, sadly
Old 08-07-2011 , 11:13   Re: TF2Items - Items with custom attributes.
#1088

is OnGive called when a player touches a supply locker too?
__________________
napalm00 is offline
PAL-18
AlliedModders Donor
Join Date: Jul 2010
Old 08-08-2011 , 02:15   Re: TF2Items - Items with custom attributes.
#1089

Thanks for fixing this so quickly when that TF2 update came out. I just donated $25

Last edited by PAL-18; 08-08-2011 at 02:31.
PAL-18 is offline
PAL-18
AlliedModders Donor
Join Date: Jul 2010
Old 08-08-2011 , 21:28   Re: TF2Items - Items with custom attributes.
#1090

Is there an attribute that produces the same effect as scout bonk atomic punch (the trail)?
PAL-18 is offline
Closed Thread



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


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