Raised This Month: $ Target: $400
 0% 

Solved Derpy code


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


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


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