|
楼主 |
发表于 2006-12-12 17:13:15
|
显示全部楼层
来自 中国–陕西–西安
回复: [求助]如何实现丢枪的效果?
[php]
if(!is_user_alive(id) || droped_money_count>=MAX_DROPED_COUNT) return PLUGIN_HANDLED
g_droped_count++
new Float:origin[3], Float:uservelocity[3], Float:velocity[3]
pev(id, pev_origin, origin)
pev(id, pev_velocity, uservelocity)
velocity_by_aim(id, 450, velocity)
velocity[0]+=uservelocity[0]
velocity[1]+=uservelocity[1]
velocity[2]+=uservelocity[2]
new Float:maxbox[3] = {100.0, 100.0, 100.0}, Float:minbox[3] = {-100.0, -100.0, -100.0}
new gEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
set_pev(gEnt, pev_classname, "My_CustomEnt")
set_pev(gEnt, pev_origin, origin)
//set_pev(gEnt, pev_mins, minbox)
//set_pev(gEnt, pev_maxs, maxbox)
set_pev(gEnt, pev_solid, 1)
set_pev(gEnt, pev_movetype, 6)
set_pev(gEnt, pev_velocity, velocity)
set_pev(gEnt, pev_iuser1, g_roundcount)
set_pev(gEnt, pev_iuser2, 1000)
set_pev(gEnt, pev_iuser3, id)
set_pev(gEnt, pev_fuser1, get_gametime())
//set_pev(gEnt, pev_size, minbox, maxbox)
entity_set_size(gEnt, minbox, maxbox)
engfunc(EngFunc_SetModel, gEnt, g_Model[0])
return PLUGIN_HANDLED
[/php]
注释掉那几行也打开过,
new Float:maxbox[3] = {100.0, 100.0, 100.0}, Float:minbox[3] = {-100.0, -100.0, -100.0}
这一行也改成过
new Float:maxbox[3] = {100.0, 100.0, 100.0}, Float:minbox[3] = {100.0, 100.0, 100.0}
还是不行呀。
其它都正常。 |
|