|
楼主 |
发表于 2008-5-17 10:10:56
|
显示全部楼层
来自 中国–香港
回复: 免費送炸彈和閃光彈問題
Post by Rulzy
is_user_connected(id) 这个是已经连接了的。
正在连接的函数是:is_user_connecting(...
這樣?
順道問一下...能不能教我排位?
[php]#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <fun>
#define PLUGIN_NAME "Free eq"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "ToKyo"
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_event("ResetHUD","eResetHUD","b")
return PLUGIN_CONTINUE
}
public eResetHUD(id) {
if (is_user_connecting(id)){
return PLUGIN_CONTINUE
}
else {
give_user_nade(id)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public give_user_nade(id) {
static weapons
weapons = pev(id, pev_weapons)
if(weapons & (1<<CSW_HEGRENADE) <= 0)
give_item(id, "weapon_hegrenade")
if(cs_get_user_bpammo(id, CSW_FLASHBANG) < 2)
{
give_item(id, "weapon_flashbang")
cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
}
if(weapons & (1<<CSW_SMOKEGRENADE) <= 0)
give_item(id, "weapon_smokegrenade")
return PLUGIN_CONTINUE
}
[/php] |
|