|
发表于 2007-11-12 01:27:01
|
显示全部楼层
|阅读模式
来自 中国–广西–南宁–武鸣区
/*
* AMX MODX SCRIPT
*
* Change the Model
* Use / benutze: say /ratte or /agent or /bender
* for AMX MODX by Eisbein >>peter@rd-4u.de
*
*
*
* mfG PAPA_SCHLUMPF
*/
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#define TEAM_T 1
#define TEAM_CT 2
public changeratte(id){
if (get_user_flags(id) & ADMIN_RESERVATION) {
if(get_cvar_num("cm_ratte") == 1 || get_user_team(id)==TEAM_T )
{
new said[256],name[32],check[4]
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players[32],num,i=0
if (is_user_alive(id))
get_players(players, num ,"ac")
else
get_players(players, num ,"bc")
for (i=0;i<num;i++)
client_print(players,print_chat,"%s 凭一星VIP权利换了1号服装,真帅!",name)
cs_set_user_model(id,"vip1_t")
}
else
client_print(id,print_chat,"Model Disabled")
}
return PLUGIN_HANDLED
}
public changerattect(id) {
if (get_user_flags(id) & ADMIN_RESERVATION) {
if(get_cvar_num("cm_ratte") == 2 || get_user_team(id)==TEAM_CT )
{
new said[256],name[32],check[4]
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players[32],num,i=0
if (is_user_alive(id))
get_players(players, num ,"ac")
else
get_players(players, num ,"bc")
for (i=0;i<num;i++)
client_print(players,print_chat,"%s 凭一星VIP权利换了1号服装,真帅!",name)
cs_set_user_model(id,"vip1_ct")
}
else
client_print(id,print_chat,"Model Disabled")
}
return PLUGIN_HANDLED
}
//
//
//
public changeagent(id) {
if (get_user_flags(id) & ADMIN_KICK) {
if(get_cvar_num("cm_agent") == 1 || get_user_team(id)==TEAM_T)
{
new said[256],name[32],check[4]
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players[32],num,i=0
if (is_user_alive(id))
get_players(players, num ,"ac")
else
get_players(players, num ,"bc")
for (i=0;i<num;i++)
client_print(players,print_chat,"%s 凭二星VIP权利换了2号服装,简直帅呆了!",name)
cs_set_user_model(id,"vip2_t")
}
else
client_print(id,print_chat,"Model Disabled")
}
return PLUGIN_HANDLED
}
public changeagentct(id) {
if (get_user_flags(id) & ADMIN_KICK) {
if(get_cvar_num("cm_agent") == 2 || get_user_team(id)==TEAM_CT)
{
new said[256],name[32],check[4]
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players[32],num,i=0
if (is_user_alive(id))
get_players(players, num ,"ac")
else
get_players(players, num ,"bc")
for (i=0;i<num;i++)
client_print(players,print_chat,"%s 凭二星VIP权利换了2号服装,简直帅呆了!",name)
cs_set_user_model(id,"vip2_ct")
}
else
client_print(id,print_chat,"Model Disabled")
}
return PLUGIN_HANDLED
}
//
//
//
public changebender(id) {
if (get_user_flags(id) & ADMIN_LEVEL_A) {
if(get_cvar_num("cm_bender") == 1 || get_user_team(id)==TEAM_T)
{
new said[256],name[32],check[4]
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players[32],num,i=0
if (is_user_alive(id))
get_players(players, num ,"ac")
else
get_players(players, num ,"bc")
for (i=0;i<num;i++)
client_print(players,print_chat,"%s 凭美女专用VIP权利换了套MM服装,真的好漂亮啊!",name)
cs_set_user_model(id,"mm1_t")
}
else
client_print(id,print_chat,"Model Disabled")
}
return PLUGIN_HANDLED
}
public changebenderct(id) {
if (get_user_flags(id) & ADMIN_LEVEL_A) {
if(get_cvar_num("cm_bender") == 2 || get_user_team(id)==TEAM_CT)
{
new said[256],name[32],check[4]
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players[32],num,i=0
if (is_user_alive(id))
get_players(players, num ,"ac")
else
get_players(players, num ,"bc")
for (i=0;i<num;i++)
client_print(players,print_chat,"%s 凭美女专用VIP权利换了套MM服装,真的好漂亮啊!",name)
cs_set_user_model(id,"mm1_ct")
}
else
client_print(id,print_chat,"Model Disabled")
}
return PLUGIN_HANDLED
}
//
//
//
//
//
//
//
public plugin_precache()
{
precache_model("models/player/vip1_t/vip1_t.mdl")
precache_model("models/player/vip1_ct/vip1_ct.mdl")
precache_model("models/player/vip2_t/vip2_t.mdl")
precache_model("models/player/vip2_ct/vip2_ct.mdl")
precache_model("models/player/mm1_t/mm1_t.mdl")
precache_model("models/player/mm1_ct/mm1_ct.mdl")
return PLUGIN_CONTINUE
}
public plugin_init()
{
register_cvar("cm_ratte","1")
register_clcmd("say /ratte","changeratte")
register_clcmd("say /ratte","changerattect")
register_cvar("cm_agent","1")
register_clcmd("say /agent","changeagent")
register_clcmd("say /agent","changeagentct")
register_cvar("cm_bender","1")
register_clcmd("say /bender","changebender")
register_clcmd("say /bender","changebenderct")
register_plugin("changetheModel","1.0","Eisbein")
return PLUGIN_CONTINUE
}
上面的情况可以换服装,但是只能换土匪的装,也就是做了警察,衣服还是土匪的! |
|