Raised This Month: $ Target: $400
 0% 

Player Model ZP / GunXP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-31-2017 , 12:01   Player Model ZP / GunXP
Reply With Quote #1

Hi, i tired make a player model gunxp unlock for zp mod with it functions
its a player model but when i unlock it under the game i dont get the unlock when i unlock it or when spawn or when turned intro human / survovir
so could any one fix this code? and thanx!

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

new g_has_model[33], item_item;

new const 
MODEL[] = "Smith_Brown";

public 
plugin_init()
{
    
register_plugin("Unlock: Smith Brown","1.0","DeXTeR")

    
item_item gxm_register_item("Smith Brown"1500030"Player")

    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1);
}

public 
plugin_precache()
{
    new 
szModel[64];
    
formatex(szModelcharsmax(szModel), "models/players/%s/%s.mdl"MODELMODEL);
    
precache_model(MODEL);
}

public 
client_putinserver(id)
{
    
g_has_model[id] = false;
}

public 
client_connect(id)
{
    
g_has_model[id] = false;
}

public 
client_disconnect(id)
{
    
g_has_model[id] = false;
}

public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id) || !cs_get_user_team(id))
        return;

    if (
g_has_model[id] && !zp_get_user_zombie(id))
        
cs_set_user_model(idMODEL);
}


public 
gxm_item_selected(idselected_item)
{
    if(
selected_item == item_item)
    {
        
g_has_model[id] = true;
        
cs_set_user_model(idMODEL);
    }
}

public 
zp_user_humanized_post(idsurvivor)
{
    if (!
survivor && g_has_model[id])
    {
        
cs_set_user_model(idMODEL);
    }

__________________

Last edited by D3XT3R; 06-01-2017 at 17:49.
D3XT3R is offline
Send a message via Skype™ to D3XT3R
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 05-31-2017 , 13:02   Re: Player Model ZP / GunXP
Reply With Quote #2

any help?
UP
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-31-2017 , 15:03   Re: Player Model ZP / GunXP
Reply With Quote #3

Up it every 5 minutes. I'm sure it will be worth it.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-01-2017 , 10:18   Re: Player Model ZP / GunXP
Reply With Quote #4

thanx for yours nice help!
// i dont know why you always comment to people thread with stuipid things with no help :v
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
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
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-01-2017 , 17:50   Re: Player Model ZP / GunXP
Reply With Quote #6

thanx unknown for this shit code but not work ;p
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-01-2017 , 18:28   Re: Player Model ZP / GunXP
Reply With Quote #7

[sarcasm]There's a good way to say "Thanks for you help even if it didn't work", I like it.[/sarcasm]
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-01-2017 , 18:53   Re: Player Model ZP / GunXP
Reply With Quote #8

Quote:
Originally Posted by EFFx View Post
[sarcasm]There's a good way to say "Thanks for you help even if it didn't work", I like it.[/sarcasm]
and ther is better way to say try this code not say rip off
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Unknown Guy
Member
Join Date: Dec 2014
Location: Munich, Germany
Old 06-02-2017 , 10:10   Re: Player Model ZP / GunXP
Reply With Quote #9

It's not my code. You ripped off xbatista's unlock by removing commented lines and claiming it as your own.
Unknown Guy is offline
D3XT3R
AlliedModders Donor
Join Date: Nov 2016
Location: Lithuania, Bomb A (Kauna
Old 06-03-2017 , 07:50   Re: Player Model ZP / GunXP
Reply With Quote #10

wtf? you realy crazy gay that i like you you can see the codes are diferents but both shits and both not works ;D
__________________
D3XT3R is offline
Send a message via Skype™ to D3XT3R
Reply



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 09:56.


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