Raised This Month: $ Target: $400
 0% 

Wrong model loaded


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
carlowo
New Member
Join Date: Dec 2015
Old 12-21-2015 , 00:51   Wrong model loaded
Reply With Quote #1

Hi guys, i created this plugin:
When someone says "/dust2", he receives a model with dust2's texture (like a camo suit). Same with "/inferno", "/inferno_2", etc.

Some people have trouble loading the right model; they see a random model (robocop model, admins model, depende on the player)

(i'am new)
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>


public plugin_init() 
{
    
register_plugin("Camo""1.0""carlowo")
    
register_clcmd("say /dust2""cmdDust2"
    
register_clcmd("say /dust2_porton""cmdDust2Porton"
    
register_clcmd("say /dust2_rocas""cmdDust2Rocas"
    
register_clcmd("say /inferno""cmdInferno"
    
register_clcmd("say /inferno_2""cmdInferno2"
    
register_clcmd("say /inferno_bs""cmdInfernoBs"
    
register_cvar("amx_models""1")        
    return 
PLUGIN_CONTINUE
}

public 
plugin_precache() 
{
    
precache_model("models/player/camo_dust2/camo_dust2.mdl")
    
precache_model("models/player/camo_dust2_porton/camo_dust2_porton.mdl")
    
precache_model("models/player/camo_dust2_rocas/camo_dust2_rocas.mdl")
    
precache_model("models/player/camo_inferno/camo_inferno.mdl")
    
precache_model("models/player/camo_inferno_2/camo_inferno_2.mdl")
    
precache_model("models/player/camo_inferno_bs/camo_inferno_bs.mdl")
        return 
PLUGIN_CONTINUE
}


public 
cmdDust2(id)
{
    
cs_set_user_model(id"camo_dust2")
}  

public 
cmdDust2Porton(id)
{
    
cs_set_user_model(id"camo_dust2_porton")
}  

public 
cmdDust2Rocas(id)
{
    
cs_set_user_model(id"camo_dust2_rocas")
}  

public 
cmdInferno(id)
{
    
cs_set_user_model(id"camo_inferno")
}  

public 
cmdInferno2(id)
{
    
cs_set_user_model(id"camo_inferno_2")
}  

public 
cmdInfernoBs(id)
{
    
cs_set_user_model(id"camo_inferno_bs")

Any idea?

Last edited by carlowo; 12-21-2015 at 00:58.
carlowo 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 17:53.


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