←  Pluginy

AMXX.pl: Support AMX Mod X i SourceMod

»

Modyfikacja
Przerobienie vipa.

Zablokowany

stolarz - zdjęcie stolarz 07.08.2011

Logi:
L 08/07/2011 - 15:49:58: [] Displaying debug trace (plugin "vipek.amxx")
L 08/07/2011 - 15:49:58: [] Run time error 10: native error (native "get_user_flags")
L 08/07/2011 - 15:49:58: [] [0] vipek.sma::TakeDamage (line 42

Daje vipa w załączniky, proszę o szybkie przerobienie, żeby vip działał sprawnie.

Załączone pliki

  • Załączony plik  vipek.sma   1,38 KB   44 Ilość pobrań
Odpowiedz

  • +
  • -
;(( - zdjęcie ;(( 08.08.2011

#include <amxmodx>

#include <hamsandwich>

#include <fun>

#include <cstrike>



#define PLUGIN "Vip"

#define VERSION "1.0"

#define AUTHOR "Muzzi"

#define FLAGA_VIP 		ADMIN_LEVEL_H



public plugin_init()

{

	register_plugin(PLUGIN, VERSION, AUTHOR)

	RegisterHam(Ham_Spawn,"player","resp_task",1)

	RegisterHam(Ham_TakeDamage, "player", "TakeDamage");

	register_event("DeathMsg", "DeathMsg", "a");

}



public resp(id)

{

	if (is_user_alive(id) && get_user_flags(id) & FLAGA_VIP)

	{

		switch(get_user_team(id) - 1)

		{

			case 0: 

			{

				set_user_health(id,get_user_health(id) + 500 )

				client_print(id,print_chat,"Jako Vip dostajesz +500 HP!");

			}

			case 1: 

			{

				set_user_health(id,get_user_health(id) + 50 )

				set_user_armor(id,get_user_armor(id) + 150 )

				client_print(id,print_chat,"Jako Vip dostajesz +50 HP oraz +150 Armoru!");

			}

		}

	}

}



public TakeDamage(this, idinflictor, idattacker,Float:damage, damagebits)

{

	if (is_user_alive(idattacker) && get_user_flags(idattacker) & FLAGA_VIP)

	{

		SetHamParamFloat(4, damage + (damage * (0.01*20)));

	}

	return HAM_HANDLED;

}



public DeathMsg()

{

	new kid = read_data(1); //zabojca

	if (is_user_alive(kid) && get_user_flags(kid) & FLAGA_VIP)

	{

		switch(get_user_team(kid))

		{

			case 1: set_user_health(kid,get_user_health(kid) + 1000)

			case 2: set_user_health(kid,get_user_health(kid) + 10)

		}

	}

}



public resp_task(id)

{

	set_task(8.0, "resp", id);

}




Użytkownik DAMIANq edytował ten post 08.08.2011 10:40
Odpowiedz
Zablokowany