Синтаксис:
UTIL_GetEntityAiming(index)
index - индекс игрока, по прицелу которого мы и определяем объект.
« Февраль 2025 » | ||||||
---|---|---|---|---|---|---|
Пн | Вт | Ср | Чт | Пт | Сб | Вс |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 |
/* Unregisters a forward.
* The registerId must be from register_forward, and
* post/forwardtype must match what you registered the forward as.
*/
native unregister_forward(_forwardType, registerId, post=0);
/**
* Looks up the sequence for the entity.
*
* @param entity The entity id to lookup.
* @param name The sequence name to lookup, case insensitive. ("JUMP" would match "jump")
* @param framerate The framerate of the sequence, if found.
* @param loops Whether or not the sequence loops.
* @param groundspeed The groundspeed setting of the sequence.
* @return -1 on failed lookup, the sequence number on successful lookup.
*/
native lookup_sequence(entity, const name[], &Float:framerate = 0.0, &bool:loops = false, &Float:groundspeed = 0.0)
stock bool:fm_strip_user_gun(index, wid = 0, const wname[] = "") {
new ent_class[32];
if (!wid && wname[0])
copy(ent_class, sizeof ent_class - 1, wname);
else {
new weapon = wid, clip, ammo;
if (!weapon && !(weapon = get_user_weapon(index, clip, ammo)))
return false;
get_weaponname(weapon, ent_class, sizeof ent_class - 1);
}
new ent_weap = fm_find_ent_by_owner(-1, ent_class, index);
if (!ent_weap)
return false;
engclient_cmd(index, "drop", ent_class);
new ent_box = pev(ent_weap, pev_owner);
if (!ent_box || ent_box == index)
return false;
dllfunc(DLLFunc_Think, ent_box);
return true;
}
// These functions are used with the entity_state data structure (FM_AddToFullPack)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array
// Set: Use anything
// Use 0 for es_handle to specify the global entity_state handle
native get_es(es_handle, EntityState:member, {Float,_}:...);
// These functions are used with the entity_state data structure (FM_AddToFullPack)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector or array
// Set: Use anything
// Use 0 for es_handle to specify the global entity_state handle
native set_es(es_handle, EntityState:member, {Float,_}:...);