←  Szukam pluginu

AMXX.pl: Support AMX Mod X i SourceMod

»

[ROZWIĄZANE] Vip Deathmatch

Zablokowany

SqNw0w - zdjęcie SqNw0w 17.08.2012

Tak jak w temacie szukam pluginu vip na serwer Deathmatch.

Vip miał by zawierać

- Podwójny skok
- Wszystkie granaty na spawnie
- 10hp za zabicie | 15hp za zabicie HS
- Napis VIP w tabeli
Odpowiedz

  • +
  • -
speedkill - zdjęcie speedkill 17.08.2012

#include <amxmodx>

#include <fakemeta>

#include <fun>

#include <hamsandwich>



new skoki[33], bool:g_Vip[33];



public plugin_init(){

	register_plugin("VIP Ultimate", "3.2.0.2", "benio101 & speedkill");

	register_message(get_user_msgid("ScoreAttrib"), "g_VipStatus");

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

	RegisterHam(Ham_Spawn, "player", "SpawnedEventPre", 1);

	register_forward(FM_CmdStart, "CmdStartPre");

}



public g_VipStatus(){

	new id=get_msg_arg_int(1);

	if(is_user_alive(id) && g_Vip[id])

		set_msg_arg_int(2, ARG_BYTE, get_msg_arg_int(2)|4);

}



public DeathMsg(){

	new killer=read_data(1);

	new victim=read_data(2);



	if(is_user_alive(killer) && g_Vip[killer]){

		if(get_user_team(killer) != get_user_team(victim)){

			new g_Hs=read_data(3);

			new g_Hp=get_user_health(killer);

			if(g_Hs){

				if(g_Hp < 130){

					if(g_Hp + 15 > 130){

						new g_Dif=130-g_Hp;

						set_user_health(killer,g_Hp + g_Dif);

					}

					else

						set_user_health(killer,g_Hp + 15);

				}

			}

			else{

				if(g_Hp < 130){

					if(g_Hp + 10 > 130){

						new g_Dif=130-g_Hp;

						set_user_health(killer,g_Hp + g_Dif);

					}

					else

						set_user_health(killer,g_Hp + 10);

				}

			}

		}

	}

}



public client_authorized(id){

	if(get_user_flags(id) & 524288 == 524288){

		g_Vip[id]=true;

	}

}



public client_disconnect(id){

	if(g_Vip[id]){

		g_Vip[id]=false;

	}

}



public SpawnedEventPre(id){

	if(is_user_alive(id) && g_Vip[id])

		SpawnedEvent(id);

}



public SpawnedEvent(id){

	give_item(id, "weapon_hegrenade");

	give_item(id, "weapon_flashbang");

	give_item(id, "weapon_smokegrenade");

	skoki[id]=2;



	return PLUGIN_CONTINUE;

}



public CmdStartPre(id,uc_handle){

	if(is_user_alive(id) && g_Vip[id])

		CmdStart(id,uc_handle);

}



public CmdStart(id,uc_handle){

	new flags = pev(id, pev_flags);

	if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id]){

		--skoki[id];

		new Float:velocity[3];

		pev(id, pev_velocity,velocity);

		velocity[2] = random_float(265.0,285.0);

		set_pev(id,pev_velocity,velocity);

	} else if(flags & FL_ONGROUND)

		skoki[id] = 2;

	return FMRES_IGNORED;

}
Odpowiedz

  • +
  • -
Kawon - zdjęcie Kawon 20.08.2012

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Odpowiedz
Zablokowany