modificare VIP

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 15:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

24 Aug 2013, 17:18

AM SI IO ACEST PLUGIN VIP
| Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."

new g_maxplayers
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)
new weapon_name[24]
for (new i = 1; i <= 30; i++)
{
if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
{
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
}
}
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
gViata = register_cvar("vip_hp", "400");
gArmura = register_cvar("vip_armour", "300");
gHE = register_cvar("vip_he_nr", "3");
gGodModeTime = register_cvar("vip_god_time", "15");
gTeleportTime = register_cvar("vip_teleport_time", "1.0");
register_logevent("Inceput_runda", 2 , "1=Round_Start");
RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
register_clcmd("say /vipmenu", "Creare_meniu");
register_clcmd("say_team /vipmenu", "Creare_meniu");
return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
		recoil[id] = false
public Inceput_runda()
{
new players[32], num;
get_players(players, num, "p");

for(new i = 0; i < num; i++) 
{
gUsed = 0;
}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
if( get_user_flags( id ) & ACCES_LEVEL)
{
if(gUsed[id] == 0)
{
new menu = menu_create("Alege o optiune:", "menu_handler");
menu_additem(menu, "400 HP si 300 Armour", "1", 0);
menu_additem(menu, "HE Grenades", "2", 0);
menu_additem(menu, "GodMode", "3", 0);
menu_additem(menu, "Teleport", "4", 0);
menu_additem(menu, "Norecoil", "5",0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

menu_display(id, menu, 0);
}
}
else
client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}

new data[6], szName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);

new key = str_to_num(data);

switch(key)
{
case 1:
{
client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
set_user_health(id, get_pcvar_num(gViata));
set_user_armor(id, get_pcvar_num(gArmura));
menu_destroy(menu);
return PLUGIN_HANDLED;
}
case 2:
{
client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
menu_destroy(menu);
return PLUGIN_HANDLED;
}
case 3:
{
client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
gHasGodMode[id] = 1;
set_task( get_pcvar_float(gGodModeTime), "End_God", id);
menu_destroy(menu);
return PLUGIN_HANDLED;
}
case 4:
{
client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
menu_destroy(menu);
return PLUGIN_HANDLED;
}
case 5:
{	
client_print(id, print_chat, "Ai primit No Recoil");
recoil[id] = true
menu_destroy(menu);
return PLUGIN_HANDLED;
}
}
return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
if(gHasGodMode[victim])
return HAM_SUPERCEDE;

return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
get_user_origin(id,blinkSpot[id],3)
origBlinkSpot[id][0] = blinkSpot[id][0]
origBlinkSpot[id][1] = blinkSpot[id][1]
origBlinkSpot[id][2] = blinkSpot[id][2]

blinkSpot[id][2] += 45
set_user_origin(id,blinkSpot[id])
checkCount[id] = 1
positionChangeTimer(id)
return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
if (!is_user_alive(id)) return

new Float:velocity[3]
get_user_origin(id, g_lastPosition[id])

entity_get_vector(id, EV_VEC_velocity, velocity)
if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
velocity[0] = 50.0
velocity[1] = 50.0
entity_set_vector(id, EV_VEC_velocity, velocity)
}

set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
if (!is_user_alive(id)) return

new origin[3]
get_user_origin(id, origin)

if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
switch(checkCount[id]) {
case 0 : blink_movecheck(id, 0, 0, 0)    // Original
case 1 : blink_movecheck(id, 0, 0, 80)    // Up
case 2 : blink_movecheck(id, 0, 0, -110)    // Down
case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
case 4 : blink_movecheck(id, 0, -30, 0)    // Back
case 5 : blink_movecheck(id, -30, 0, 0)    // Left
case 6 : blink_movecheck(id, 30, 0, 0)    // Right
case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
default: user_kill(id)
}
return
}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
blinkSpot[id][0] = origBlinkSpot[id][0] + mX
blinkSpot[id][1] = origBlinkSpot[id][1] + mY
blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
set_user_origin(id,blinkSpot[id])
checkCount[id]++
positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)

	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)

	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}
SI AS VREA SA MIL COLORATI PUTIN SI SA PUNETI CA MENIUL SA POATA FI ACCESAT DOAR DE 2 ORI PE RUNDA
IAR CAND SCRIU /vips sa imi apara vip online

MULTUMESC
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] [email protected]
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
RoyalServer
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 15:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

25 Aug 2013, 14:08

upppppp
:-" :-"
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] [email protected]
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times

26 Aug 2013, 11:49

Poftim | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."

static const COLORG[] = "^x04"
static const COLORD[] = "^x01"
static const COLORT[] = "^x03"

new g_maxplayers
new maxplayers, gmsgSayText
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_say")
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		if(gUsed[id] == 0)
		{
			new menu = menu_create("Alege o optiune:", "menu_handler");
			menu_additem(menu, "400 HP si 300 Armour", "1", 0);
			menu_additem(menu, "HE Grenades", "2", 0);
			menu_additem(menu, "GodMode", "3", 0);
			menu_additem(menu, "Teleport", "4", 0);
			menu_additem(menu, "Norecoil", "5",0);
			menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
			
			menu_display(id, menu, 0);
			gUsed[id] ++;
		}
		else if(gUsed[id] >= 2){
			client_print(id, print_chat, "Ai folosit deja meniul")
			return 1;
		}
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
		
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_viplist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H )
		get_user_name(id, adminnames[count++], 31)
	
	len = format(message, 255, "%s VIPI ONLINE: ",COLORG)
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "^x03%s%s ", adminnames[x], x < (count-1) ? ", ":"", COLORT)
			if(len > 96 ) {
				print_message(user, message)
				len = format(message, 255, "%s ",COLORG)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, "^x01Nu sunt VIPI online.", COLORD)
		print_message(user, message)
	}
	
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

public handle_say(id) {
	new said[192]
	read_args(said,192)
	if( ( containi(said, "vips") != -1 && containi(said, "vips") != -1 ) || contain(said, "/vips") != -1 )
		set_task(0.1,"print_viplist",id)
	return PLUGIN_CONTINUE
}
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 15:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

26 Aug 2013, 19:27

mersi dar vezi ca la comanda /vips nu se intampla nimic
si meniul poate fi accesat doar o data pe runda si eu as vrea de 2 x pe runda
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] [email protected]
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
-Turbo-
Membru, skill +4
Membru, skill +4
Posts: 1664
Joined: 11 Nov 2012, 01:28
Detinator Steam: Da
CS Status: Bored !
Detinator server CS: Da
SteamID: kingforbidden
Reputatie: Utilizator neserios ( tepar )
Restrictie moderator
Ban scos ( achitat )
Nume anterior: Turbo19973
Location: Botosani
Has thanked: 49 times
Been thanked: 212 times

27 Aug 2013, 01:03

| Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."

static const COLORG[] = "^x04"
static const COLORD[] = "^x01"
static const COLORT[] = "^x03"

new g_maxplayers
new maxplayers, gmsgSayText
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
        register_clcmd("say /vips", "print_viplist");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		if(gUsed[id] == 0)
		{
			new menu = menu_create("Alege o optiune:", "menu_handler");
			menu_additem(menu, "400 HP si 300 Armour", "1", 0);
			menu_additem(menu, "HE Grenades", "2", 0);
			menu_additem(menu, "GodMode", "3", 0);
			menu_additem(menu, "Teleport", "4", 0);
			menu_additem(menu, "Norecoil", "5",0);
			menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
			
			menu_display(id, menu, 0);
			gUsed[id] ++;
		}
		else if(gUsed[id] >= 2){
			client_print(id, print_chat, "Ai folosit deja meniul")
			return 1;
		}
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
		
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_viplist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H )
		get_user_name(id, adminnames[count++], 31)
	
	len = format(message, 255, "%s VIPI ONLINE: ",COLORG)
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "^x03%s%s ", adminnames[x], x < (count-1) ? ", ":"", COLORT)
			if(len > 96 ) {
				print_message(user, message)
				len = format(message, 255, "%s ",COLORG)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, "^x01Nu sunt VIPI online.", COLORD)
		print_message(user, message)
	}
	
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 15:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

27 Aug 2013, 17:09

Turbo19973 wrote:
| Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."

static const COLORG[] = "^x04"
static const COLORD[] = "^x01"
static const COLORT[] = "^x03"

new g_maxplayers
new maxplayers, gmsgSayText
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
        register_clcmd("say /vips", "print_viplist");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		if(gUsed[id] == 0)
		{
			new menu = menu_create("Alege o optiune:", "menu_handler");
			menu_additem(menu, "400 HP si 300 Armour", "1", 0);
			menu_additem(menu, "HE Grenades", "2", 0);
			menu_additem(menu, "GodMode", "3", 0);
			menu_additem(menu, "Teleport", "4", 0);
			menu_additem(menu, "Norecoil", "5",0);
			menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
			
			menu_display(id, menu, 0);
			gUsed[id] ++;
		}
		else if(gUsed[id] >= 2){
			client_print(id, print_chat, "Ai folosit deja meniul")
			return 1;
		}
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
		
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			return PLUGIN_HANDLED;
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_viplist(user) 
{
	new adminnames[33][32]
	new message[256]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H )
		get_user_name(id, adminnames[count++], 31)
	
	len = format(message, 255, "%s VIPI ONLINE: ",COLORG)
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "^x03%s%s ", adminnames[x], x < (count-1) ? ", ":"", COLORT)
			if(len > 96 ) {
				print_message(user, message)
				len = format(message, 255, "%s ",COLORG)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, "^x01Nu sunt VIPI online.", COLORD)
		print_message(user, message)
	}
	
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

turbo e mai rau ca inainte
acum merge o data pe mapa :O :O
si comanda /vips tot nu merge
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] [email protected]
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times

27 Aug 2013, 19:45

Vezi asa :-? | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."


new g_maxplayers
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_say")
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		if(gUsed[id] >= 0)
		{
			new menu = menu_create("Alege o optiune:", "menu_handler");
			menu_additem(menu, "400 HP si 300 Armour", "1", 0);
			menu_additem(menu, "HE Grenades", "2", 0);
			menu_additem(menu, "GodMode", "3", 0);
			menu_additem(menu, "Teleport", "4", 0);
			menu_additem(menu, "Norecoil", "5",0);
			menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
			
			menu_display(id, menu, 0);
		}
		else if(gUsed[id] >= 2){
			client_print(id, print_chat, "Ai folosit deja meniul")
			return 1;
		}
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
	
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_adminlist(user) {
	new adminnames[33][32];
	new message[256];
	new id, count, x, len;
	
	for(id = 1 ; id <= get_maxplayers() ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H)
		get_user_name(id, adminnames[count++], 31);
	
	len = format(message, 255, "^x04 VIP ONLINE: ");
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
			if(len > 96) {
				print_message(user, message);
				len = format(message, 255, "^x04 ");
			}
		}
		print_message(user, message);
	}
	else {
		len += format(message[len], 255-len, "No VIP online.");
		print_message(user, message);
	}
}
print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}

public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
		set_task(0.1,"print_adminlist",id);
	return PLUGIN_CONTINUE;
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 15:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

28 Aug 2013, 00:11

FaTzZu wrote:
Vezi asa :-? | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."


new g_maxplayers
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_say")
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		if(gUsed[id] >= 0)
		{
			new menu = menu_create("Alege o optiune:", "menu_handler");
			menu_additem(menu, "400 HP si 300 Armour", "1", 0);
			menu_additem(menu, "HE Grenades", "2", 0);
			menu_additem(menu, "GodMode", "3", 0);
			menu_additem(menu, "Teleport", "4", 0);
			menu_additem(menu, "Norecoil", "5",0);
			menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
			
			menu_display(id, menu, 0);
		}
		else if(gUsed[id] >= 2){
			client_print(id, print_chat, "Ai folosit deja meniul")
			return 1;
		}
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
	
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_adminlist(user) {
	new adminnames[33][32];
	new message[256];
	new id, count, x, len;
	
	for(id = 1 ; id <= get_maxplayers() ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H)
		get_user_name(id, adminnames[count++], 31);
	
	len = format(message, 255, "^x04 VIP ONLINE: ");
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
			if(len > 96) {
				print_message(user, message);
				len = format(message, 255, "^x04 ");
			}
		}
		print_message(user, message);
	}
	else {
		len += format(message[len], 255-len, "No VIP online.");
		print_message(user, message);
	}
}
print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}

public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
		set_task(0.1,"print_adminlist",id);
	return PLUGIN_CONTINUE;
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}

multumesc dar acum merge comanda /vips dar meniul poate fi accesat cand vrei si eu vreau sa fie accesat de 2x pe runda
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] [email protected]
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times

28 Aug 2013, 01:20

Incearca :-? | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."


new g_maxplayers
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_say")
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if(gUsed[id] >= 2){
		client_print(id, print_chat, "Ai folosit deja meniul de 2 ori")
		return 1;
	}
	
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		new menu = menu_create("Alege o optiune:", "menu_handler");
		menu_additem(menu, "400 HP si 300 Armour", "1", 0);
		menu_additem(menu, "HE Grenades", "2", 0);
		menu_additem(menu, "GodMode", "3", 0);
		menu_additem(menu, "Teleport", "4", 0);
		menu_additem(menu, "Norecoil", "5",0);
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
		
		menu_display(id, menu, 0);
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
	
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_adminlist(user) {
	new adminnames[33][32];
	new message[256];
	new id, count, x, len;
	
	for(id = 1 ; id <= get_maxplayers() ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H)
		get_user_name(id, adminnames[count++], 31);
	
	len = format(message, 255, "^x04 VIP ONLINE: ");
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
			if(len > 96) {
				print_message(user, message);
				len = format(message, 255, "^x04 ");
			}
		}
		print_message(user, message);
	}
	else {
		len += format(message[len], 255-len, "No VIP online.");
		print_message(user, message);
	}
}
print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}

public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
		set_task(0.1,"print_adminlist",id);
	return PLUGIN_CONTINUE;
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
CaTa.
Fost moderator
Fost moderator
Posts: 420
Joined: 28 Jul 2013, 15:06
Detinator Steam: Nu
Detinator server CS: In curand !
Reputatie: Fost Moderator ajutator
Location: Targu-Mures
Has thanked: 99 times
Been thanked: 19 times
Contact:

28 Aug 2013, 01:31

FaTzZu wrote:
Incearca :-? | Afiseaza codul
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#include <engine>
#include <xs>

#define ACCES_LEVEL ADMIN_LEVEL_H

#define PLUGIN "VIP Furien PLUGIN"
#define VERSION "Ultimate"
#define AUTHOR "...."


new g_maxplayers
new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new gViata, gArmura, gHE, gGodModeTime, gTeleportTime;
new gHasGodMode[32], gUsed[30];
new bool:recoil[33]
new checkCount[33]
new blinkSpot[33][3]
new origBlinkSpot[33][3]
new g_lastPosition[33][3]
public plugin_init() {
	
	register_plugin(PLUGIN, VERSION, AUTHOR)
	new weapon_name[24]
	for (new i = 1; i <= 30; i++)
	{
		if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
		{
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
			RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
		}
	}
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	gViata = register_cvar("vip_hp", "400");
	gArmura = register_cvar("vip_armour", "300");
	gHE = register_cvar("vip_he_nr", "3");
	gGodModeTime = register_cvar("vip_god_time", "15");
	gTeleportTime = register_cvar("vip_teleport_time", "1.0");
	register_logevent("Inceput_runda", 2 , "1=Round_Start");
	RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" );
	register_clcmd("say /vipmenu", "Creare_meniu");
	register_clcmd("say_team /vipmenu", "Creare_meniu");
	register_clcmd("say", "handle_say")
	register_clcmd("say_team", "handle_say")
	return PLUGIN_CONTINUE
}
public event_round_start()
	for (new id = 1; id <= g_maxplayers; id++)
	recoil[id] = false
public Inceput_runda()
{
	new players[32], num;
	get_players(players, num, "p");
	
	for(new i = 0; i < num; i++) 
	{
		gUsed = 0;
	}
}
//----------------------------------------------------------------------------------------------
public Creare_meniu(id)
{
	if(gUsed[id] >= 2){
		client_print(id, print_chat, "Ai folosit deja meniul de 2 ori")
		return 1;
	}
	
	if( get_user_flags( id ) & ACCES_LEVEL)
	{
		new menu = menu_create("Alege o optiune:", "menu_handler");
		menu_additem(menu, "400 HP si 300 Armour", "1", 0);
		menu_additem(menu, "HE Grenades", "2", 0);
		menu_additem(menu, "GodMode", "3", 0);
		menu_additem(menu, "Teleport", "4", 0);
		menu_additem(menu, "Norecoil", "5",0);
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
		
		menu_display(id, menu, 0);
	}
	else
		client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");
	
	return 1;
	
}   
//----------------------------------------------------------------------------------------------
public menu_handler(id, menu, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	new data[6], szName[64];
	new access, callback;
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1:
		{
			client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura));
			set_user_health(id, get_pcvar_num(gViata));
			set_user_armor(id, get_pcvar_num(gArmura));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 2:
		{
			client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE));
			cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE));
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 3:
		{
			client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime));
			gHasGodMode[id] = 1;
			set_task( get_pcvar_float(gGodModeTime), "End_God", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 4:
		{
			client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime));
			set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id);
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
		case 5:
		{	
			client_print(id, print_chat, "Ai primit No Recoil");
			recoil[id] = true
			menu_destroy(menu);
			gUsed[id] ++;
			return PLUGIN_HANDLED;
			
		}
	}
	return 1
}
//----------------------------------------------------------------------------------------------
public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits )
{
	if(gHasGodMode[victim])
		return HAM_SUPERCEDE;
	
	return HAM_IGNORED;
}
//----------------------------------------------------------------------------------------------
public End_God(id)
{
	gHasGodMode[id] = 0;
}
//----------------------------------------------------------------------------------------------
public Teleport_handler(id)
{
	get_user_origin(id,blinkSpot[id],3)
	origBlinkSpot[id][0] = blinkSpot[id][0]
	origBlinkSpot[id][1] = blinkSpot[id][1]
	origBlinkSpot[id][2] = blinkSpot[id][2]
	
	blinkSpot[id][2] += 45
	set_user_origin(id,blinkSpot[id])
	checkCount[id] = 1
	positionChangeTimer(id)
	return PLUGIN_CONTINUE
}
//----------------------------------------------------------------------------------------------
public positionChangeTimer(id)
{
	if (!is_user_alive(id)) return
	
	new Float:velocity[3]
	get_user_origin(id, g_lastPosition[id])
	
	entity_get_vector(id, EV_VEC_velocity, velocity)
	if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) {
		velocity[0] = 50.0
		velocity[1] = 50.0
		entity_set_vector(id, EV_VEC_velocity, velocity)
	}
	
	set_task(0.1,"positionChangeCheck",id)
}
//----------------------------------------------------------------------------------------------
public positionChangeCheck(id)
{
	if (!is_user_alive(id)) return
	
	new origin[3]
	get_user_origin(id, origin)
	
	if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) {
		switch(checkCount[id]) {
			case 0 : blink_movecheck(id, 0, 0, 0)    // Original
				case 1 : blink_movecheck(id, 0, 0, 80)    // Up
				case 2 : blink_movecheck(id, 0, 0, -110)    // Down
				case 3 : blink_movecheck(id, 0, 30, 0)    // Forward
				case 4 : blink_movecheck(id, 0, -30, 0)    // Back
				case 5 : blink_movecheck(id, -30, 0, 0)    // Left
				case 6 : blink_movecheck(id, 30, 0, 0)    // Right
				case 7 : blink_movecheck(id, -30, 30, 0)    // Forward-Left
				case 8 : blink_movecheck(id, 30, 30, 0)    // Forward-Right
				case 9 : blink_movecheck(id, -30, -30, 0)    // Back-Left
				case 10: blink_movecheck(id, 30, -30, 0)    // Back-Right
				case 11: blink_movecheck(id, 0, 30, 60)    // Up-Forward
				case 12: blink_movecheck(id, 0, 30, -110)    // Down-Forward
				case 13: blink_movecheck(id, 0, -30, 60)    // Up-Back
				case 14: blink_movecheck(id, 0, -30, -110)    // Down-Back
				case 15: blink_movecheck(id, -30, 0, 60)    // Up-Left
				case 16: blink_movecheck(id, 30, 0, 60)    // Up-Right
				case 17: blink_movecheck(id, -30, 0, -110)    // Down-Left
				case 18: blink_movecheck(id, 30, 0, -110)    // Down-Right
				default: user_kill(id)
		}
		return
	}
}
//----------------------------------------------------------------------------------------------
public blink_movecheck(id, mX, mY, mZ)
{
	blinkSpot[id][0] = origBlinkSpot[id][0] + mX
	blinkSpot[id][1] = origBlinkSpot[id][1] + mY
	blinkSpot[id][2] = origBlinkSpot[id][2] + mZ
	set_user_origin(id,blinkSpot[id])
	checkCount[id]++
	positionChangeTimer(id)
} 
public fw_Weapon_PrimaryAttack_Pre(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		pev(id, pev_punchangle, cl_pushangle[id])
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
	new id = pev(entity, pev_owner)
	
	if (recoil[id])
	{
		new Float: push[3]
		pev(id, pev_punchangle, push)
		xs_vec_sub(push, cl_pushangle[id], push)
		xs_vec_mul_scalar(push, 0.0, push)
		xs_vec_add(push, cl_pushangle[id], push)
		set_pev(id, pev_punchangle, push)
		return HAM_IGNORED;
	}
	return HAM_IGNORED;
}

public print_adminlist(user) {
	new adminnames[33][32];
	new message[256];
	new id, count, x, len;
	
	for(id = 1 ; id <= get_maxplayers() ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & ADMIN_LEVEL_H)
		get_user_name(id, adminnames[count++], 31);
	
	len = format(message, 255, "^x04 VIP ONLINE: ");
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
			if(len > 96) {
				print_message(user, message);
				len = format(message, 255, "^x04 ");
			}
		}
		print_message(user, message);
	}
	else {
		len += format(message[len], 255-len, "No VIP online.");
		print_message(user, message);
	}
}
print_message(id, msg[]) {
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}

public handle_say(id) {
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
		set_task(0.1,"print_adminlist",id);
	return PLUGIN_CONTINUE;
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "^x04", "^4");
	replace_all(msg, 190, "^x01", "^1");
	replace_all(msg, 190, "^x03", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}


asta este
GJ
Dar imi poti arata mie si mie linia de unde schimbi sa fie accesat de x ori pe runda ? Ca poate as vrea sa mai modific
CLICK ! | Afiseaza codul
Ma gasesti pe Messenger la id :[/b] [email protected]
Follow me on Instagram
Fa-ti cunoscut serverul de Counter-Strike pe facebook ! 
Fa-ti reclama gratis aici Click
My Plugin Furien Guns
User avatar
FaTzZu
Fost moderator
Fost moderator
Posts: 1206
Joined: 22 Dec 2012, 18:37
Detinator Steam: Da
Reputatie: Fost moderator ajutator
Has thanked: 114 times
Been thanked: 168 times

28 Aug 2013, 01:32

public Creare_meniu(id)
{
if(gUsed[id] >= 2){
client_print(id, print_chat, "Ai folosit deja meniul de 2 ori")
return 1;
}

if( get_user_flags( id ) & ACCES_LEVEL)
{
new menu = menu_create("Alege o optiune:", "menu_handler");
menu_additem(menu, "400 HP si 300 Armour", "1", 0);
menu_additem(menu, "HE Grenades", "2", 0);
menu_additem(menu, "GodMode", "3", 0);
menu_additem(menu, "Teleport", "4", 0);
menu_additem(menu, "Norecoil", "5",0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);

menu_display(id, menu, 0);
}
else
client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!");

return 1;

}

acel 2:D
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Dot [Bot] and 10 guests