←  Pytania

AMXX.pl: Support AMX Mod X i SourceMod

»

Problem z DeathMsg


Najlepsza odpowiedź NEQU# 12.02.2017 09:28

if(5 >= rand && headshot != 1) Przejdź do postu

  • +
  • -
faken - zdjęcie faken 11.02.2017

Co robie źle, jesli chce zeby po zabiciu po przez headshot dawało sam diament? Bo tak to daje diament+klucz, a chce sam diament

#define IsPlayer(%1) (1 <= %1 <= get_maxplayers())
#define NotSameTeam(%1,%2)  (get_user_team(%1) != get_user_team(%2))

public DeathMsg()
{	
	new iKiller = read_data(1);	
	new iVictim = read_data(2);
	new headshot = read_data(3);	

	if(IsPlayer(iKiller) &&  iVictim != iKiller && NotSameTeam(iVictim, iKiller))
	{
		new rand = random_num(1, 100);

		if(5 >= rand)
		{
			gKey[iKiller] ++;							
		}		
	}
	if(headshot == 1)
	{
		new rand2 = random_num(1, 100);

		if(5 >= rand2)
		{		
			gDiamond[iKiller] ++;			
		}				
	}			
} 
Odpowiedz

  • +
  • -
Najlepsza odpowiedź NEQU# - zdjęcie NEQU# 12.02.2017

if(5 >= rand && headshot != 1)
Użytkownik NEQU# edytował ten post 12.02.2017 09:31
Odpowiedz