Raised This Month: $ Target: $400
 0% 

[Help] With Admin model Code :)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 03-20-2014 , 18:49   [Help] With Admin model Code :)
Reply With Quote #1

Hi there, helping the noobs people! I really want to ask you, where am I wrong in this code:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <engine>
#include <fakemeta>

// Define the Plugin Version
new const VERSION[] = { "1.0" };

#define vip ADMIN_LEVEL_G

public plugin_init()
{
    
register_plugin("AdminModels"VERSION"Flicker");
    
RegisterHam(Ham_Spawn,"player","FnHamSpawn",1);
}
public 
plugin_precache()
{
    
precache_model("models/player/AdminT/AdminT.mdl");
    
precache_model("models/player/AdminCT/AdminCT.mdl");
    
precache_model("models/noj12.mdl")
}
public 
FnHamSpawn(id)
{
    if(
is_user_alive(id))
    {
        if(
get_user_flags(id) & vip)
        {
            if(
cs_get_user_team(id) == CS_TEAM_CT)
            {
                
cs_set_user_model(id,"AdminCT");
            }
            else
            {
                
cs_set_user_model(id,"AdminT");
            }
        }
        if(
get_user_weapon(id) == CSW_KNIFE)
        {
            
set_pev(idpev_viewmodel2"models/noj12.mdl");
        }
    }

The purpose is a special model for the admin player (that's working) and a knife model for everyone in the server. And here comes the problem: when i connect to the server and start playing, I'm shooting with my knife Maybe the check for the weapon is worng, or I don't know, but the weapon in my hands is the glock18, but the model is the knife. Idk, if you help me, it will be great!!! Thanks a lot!
Flick3rR is offline
Send a message via Skype™ to Flick3rR
 



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 05:57.


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