Raised This Month: $ Target: $400
 0% 

Player Model ZP / GunXP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Unknown Guy
Member
Join Date: Dec 2014
Location: Munich, Germany
Old 06-01-2017 , 15:26   Re: Player Model ZP / GunXP
Reply With Quote #5

Nice rip off.

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <gunxpmod>
//#include <hamsandwich>
#include <fakemeta>
#include <zombieplague>

new bool:HasPred[33];

new const 
PLAYER_MODELS[][]= 
{
    
"Pred"  // preds model
};

public 
plugin_init()
{
    
register_plugin("Predator Model","1.0","xbatista")
    
    
register_gxm_item("Predator""Gives you Predator model"400)

    
//RegisterHam(Ham_Spawn, "player", "fwd_PlayerSpawn", 1)
}
public 
plugin_precache()  
{
    new 
modelpath_human[100]
    for(new 
0sizeof PLAYER_MODELSi++)
    {
        
formatex(modelpath_humansizeof modelpath_human 1"models/player/%s/%s.mdl"PLAYER_MODELS[i], PLAYER_MODELS[i])
        if( !
file_existsmodelpath_human ) )
        {
            return 
0;
        }

        
engfunc(EngFunc_PrecacheModelmodelpath_human);

        
formatex(modelpath_humansizeof modelpath_human 1"models/player/%s/%sT.mdl"PLAYER_MODELS[i], PLAYER_MODELS[i])
        if ( 
file_existsmodelpath_human ) )
        {
            
engfunc(EngFunc_PrecacheModelmodelpath_human);

            return 
1;
        }

    }

    return 
1;
}

public 
gxm_item_enabled(id
{
    
HasPred[id] = true;

    if ( 
is_user_alive(id) && !zp_get_user_zombie(id) )
    {
        
cs_set_user_model(idPLAYER_MODELS[0]);
    }
}
public 
client_connect(id
{
    
HasPred[id] = false;
}
public 
zp_user_humanized_pre(idsurvivor)
{
    if ( !
is_user_alive(id) || !HasPred[id] )
        return;

    
cs_set_user_model(idPLAYER_MODELS[0]);
}

/*public fwd_PlayerSpawn(id)
{
    if ( !is_user_alive(id) || !HasPred[id] || zp_get_user_zombie(id) )
        return;

    set_task( 5.0, "TaskedModel", id)
}
public TaskedModel(id)
{
    if ( !is_user_alive(id) || !HasPred[id] || zp_get_user_zombie(id) )
        return;

    cs_set_user_model(id, PLAYER_MODELS[0]);
}*/ 
https://forums.alliedmods.net/showthread.php?t=115697
Unknown Guy is offline
 



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


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