Thread: [Solved] Derpy code
View Single Post
Author Message
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-31-2013 , 14:13   Derpy code
Reply With Quote #1

PHP Code:
#include <sourcemod>
#include <tf2items>
#include <tf2_player>
public Plugin:myinfo =
{
    
name "FlexCraft Admin Weapons Handler",
    
author "WildCard65",
    
description "Autocreates the admin weapons in flexcraft.",
    
version "1.0",
    
url "http://wildcard65gaming.bounceme.net/"
};
public 
OnPluginStart()
{
    
PrintToServer("Flexcraft Admin Weapons Loaded!");
    
//AddCommandOverride("moderators_weapons_override",Override_Command,ADMFLAG_CHAT);
    //AddCommandOverride("admins_weapons_override",Override_Command,ADMFLAG_GENERIC);
    //AddCommandOverride("super_admins_weapons_override",Override_Command,ADMFLAG_UNBAN);
    //AddCommandOverride("full_admins_weapons_override",Override_Command,ADMFLAG_PASSWORD);
    
AddCommandOverride("root_admins_weapons_override",Override_Command,ADMFLAG_ROOT);
}
public 
Action:TF2Items_OnGiveNamedItem(clientString:classname[], iItemDefinitionIndex, &Handle:hItem)
{
    if(
CheckCommandAccess(client,"root_admins_weapons_override",ADMFLAG_ROOT)){
        if (
hItem != INVALID_HANDLE) {
            
PrintToServer("Handle not invalid");
            return 
Plugin_Continue;
        }
        
hItem TF2Items_CreateItem(OVERRIDE_ITEM_QUALITY|OVERRIDE_ITEM_LEVEL|OVERRIDE_ATTRIBUTES);
        
TF2Items_SetQuality(hItem,8);
        
TF2Items_SetLevel(hItem,5000);
        if(
StrEqual(classname,"tf_wearable")){
            
TF2Items_SetAttribute(hItem113413);
            
TF2Items_SetAttribute(hItem22610);
        }
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;
}
public 
OnPluginEnd()
{

Can someone tell me if anywhere in this is causing it to be derpy on assigning attributes?

Last edited by WildCard65; 01-01-2014 at 07:58.
WildCard65 is offline