不能更换两种服装,不知道错在哪里!
/** 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,name,check
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players,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,name,check
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players,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,name,check
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players,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,name,check
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players,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,name,check
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players,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,name,check
read_argv(1,check,3)
read_args(said,255)
get_user_name(id,name,31)
new players,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
}
上面的情况可以换服装,但是只能换土匪的装,也就是做了警察,衣服还是土匪的!
回复: 不能更换两种服装,不知道错在哪里!
关于注册命令,还没入门,呵呵,先自己学学怎么注册命令吧:)回复: 不能更换两种服装,不知道错在哪里!
老大能不能具体说明一下啊!我实在是迷糊了!回复: 不能更换两种服装,不知道错在哪里!
哈哈~我明白了去部是==1 再把||改&&就OK了
回复: 不能更换两种服装,不知道错在哪里!
真是太有才了!挖哈哈~多谢点通编写指南·回复: 不能更换两种服装,不知道错在哪里!
哇,服务器用到那么多皮肤模型!我估计玩家下载时必将是一个痛苦的等待过程!我的服务器只用到了alien4和goomba这两个怪物模型,但也足够让玩家下载好一阵子.要是用在CS1.5里,下载的时间就更长了,很多玩家都等得不耐烦,中途就退出了.因此,对于插件用到的额外皮肤模型,我个人的感觉就是: 纯属娱乐,实用性不大.服务器的插件越精简越好,真正地回归到比赛插件的状态,才是王道之选!
回复: 不能更换两种服装,不知道错在哪里!
CS1.6,用HTTP下载,几秒钟或十几秒钟就下完了回复: 不能更换两种服装,不知道错在哪里!
是啊~比下地图快,我5个模型30秒内吧,看网速了。真有想玩娱乐性的还是有人会等的,想玩简单的就去比赛服。
页:
[1]