|
Osker Lee大哥CS领军人物插件变小矮人问题
各位老大们帮忙修改个插件就是关于CS令军人物插件的问题
我跟我的朋友在玩的时候.我发现一个很奇怪的问题
就是做贼的一方玩了几局之后人物会缩的很小很小
Osker Lee大哥..我突然间想起一个想法能不能请你帮忙实现一下呢大哥
就是把这个插件改成所有人进来玩的时候都是200血
所有人都会缩的很小小!我有图给你看下,请你帮忙实现下!多谢帮忙实现一下大哥
大哥以下修改哪种代码可以把直接进来的人都缩的很小很小
大哥麻烦你修改完以后直接发上来好吗!?
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
/* Keep Track of Player ID for Lead Player on each Team */
new g_Lead_CT = -1
new g_Lead_T = -1
/*
*********************************************************
* Find the lead player for each team and make them glow *
*********************************************************
*/
public plugin_init()
{
register_plugin("Team Leader", "1.0", "X-man");
register_event("ResetHUD", "resetModel", "b");
return PLUGIN_CONTINUE;
}
public plugin_precache() {
precache_model("models/player/vip/vip.mdl")
precache_model("models/player/rabbit/rabbit.mdl")
return PLUGIN_CONTINUE
}
public resetModel() {
/* Skip the glowing if there's only two people playing */
new i_numplayers = get_playersnum(0); /* get number of alive players */
if (i_numplayers < 2) return
i_numplayers = get_playersnum(1); /* get total number of players, including ones connecting */
/* Figure out who the Lead Player is for each team */
new i_Lead_CT_frags = -100
new i_Lead_T_frags = -100
new i_Lead_CT_deaths = -100
new i_Lead_T_deaths = -100
new s_team[3]
new i_frags
new i_deaths
g_Lead_CT = -1
g_Lead_T = -1
for (new i_player = 0; i_player < i_numplayers; i_player++) {
i_frags = get_user_frags(i_player)
i_deaths = get_user_deaths(i_player)
get_user_team(i_player, s_team, 3)
/* is player Lead CT? */
if (equali(s_team,"CT",2))
if ((i_frags > i_Lead_CT_frags) ||
((i_frags == i_Lead_CT_frags) && (i_deaths < i_Lead_CT_deaths))) {
i_Lead_CT_frags = i_frags
i_Lead_CT_deaths = i_deaths
g_Lead_CT = i_player
}
/* is player Lead Terrorist? */
if (equali(s_team,"TE",2))
if ((i_frags > i_Lead_T_frags) ||
((i_frags == i_Lead_T_frags) && (i_deaths < i_Lead_T_deaths))) {
i_Lead_T_frags = i_frags
i_Lead_T_deaths = i_deaths
g_Lead_T = i_player
}
}
/* 分别给予双方的领军人物一个特殊的皮肤模型,200生命值和200盔甲值,并且每一局开始时自动获得16000$的全额资金 */
if (g_Lead_CT != -1)
cs_set_user_model(g_Lead_CT,"vip")
set_user_health(g_Lead_CT,200)
set_user_armor(g_Lead_CT,200)
cs_set_user_money(g_Lead_CT,16000)
if (g_Lead_T != -1)
cs_set_user_model(g_Lead_T,"rabbit")
set_user_health(g_Lead_T,200)
set_user_armor(g_Lead_T,200)
cs_set_user_money(g_Lead_T,16000)
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|