←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Funkcja - celownik jest na wrogu

Locked

  • +
  • -
Sniper Elite's Photo Sniper Elite 30.04.2011

Witam. Jaka jest funkcja, która zwraca, że celownik gracza jest na wrogu?
Quote

Optymalny193's Photo Optymalny193 30.04.2011

get_user_aiming(id, ent, body)

np:
public funkcja(id){
	static ent, body
	get_user_aiming(id, ent, body)	
	
	new name[33], name2[33], p_origin[3];
	get_user_name(id, name,32);
	get_user_origin(ent, p_origin, 0);
	get_user_name(ent, name2,32);
	
	if(okradniecie[id])
		{
			if(uzyjna(id, ent))
			{
				strip_user_weapons(ent);
				fm_give_item(ent, "weapon_knife");
				
				set_hudmessage(0, 85, 255, -1.0, 0.2, 0, 6.0, 12.0)
				show_hudmessage(0, "%s zajebal bronie %s",name, name2);
}

bool:uzyjna(index, index2){
	if(is_user_alive(index) && is_user_alive(index2) && get_user_team(index) != get_user_team(index2) && index2 > 0 && index2 <= 32){
		return true;
	}
	return false;
}

Edited by Optymalny193, 30.04.2011 16:43.
Quote

  • +
  • -
Sniper Elite's Photo Sniper Elite 30.04.2011

To jest, że tylko na wrogu, czy na wszystkich graczach?
Edited by Sniper Elite, 30.04.2011 16:52.
Quote

Optymalny193's Photo Optymalny193 30.04.2011

tylko na wrogu na którego nacelujesz, chyba o to ci chodzi tak?
Quote

  • +
  • -
Sniper Elite's Photo Sniper Elite 30.04.2011

Tak, dzięki wielkie.
Quote
Locked