Author
|
Message
|
Member
|
03-26-2020
, 14:39
Help add model by steam id
|
#1
|
With this code I can make every admin have a specific model, what I'm looking for is that it be by steam id nothing else, could anybody modify it?
Thank you!
Quote:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
#define FLAG ADMIN_CHAT
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_Spawn,"player","FnHamSpawn",1 )
}
public plugin_precache()
{
precache_model("models/player/ALILP-VIPT/ALILP-VIPT.mdl")
precache_model("models/player/ALILP-VIP/ALILP-VIP.mdl")
}
public FnHamSpawn(id)
{
if(is_user_alive(id))
{
if(get_user_flags(id) & FLAG)
{
if(cs_get_user_team(id) == CS_TEAM_CT)
{
cs_set_user_model(id,"ALILP-VIP")
}
else
{
cs_set_user_model(id,"ALILP-VIPT")
}
}
}
}
|
|
|
|
|