Camera 2.0

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
eNd.
Membru, skill +1
Membru, skill +1
Posts: 236
Joined: 19 Jan 2013, 21:18
Detinator Steam: Da
CS Status: Whoa...
SteamID: skitaila03
Has thanked: 18 times
Been thanked: 79 times

19 Jan 2013, 21:47

Image

Nume: Camera
Autor: eNd.
Versiune: 2.0

Image
Comenzi:
say /cam
say_team /cam
say /camera
say_team /camera
Cvaruri:
//Plugin Pornit/Oprit
cam_on 1/0
//Mod 3D Pornit/Oprit
cam_3d_on 1/0
//Mod Top Pornit/Oprit
cam_top_on 1/0
//Mod Normal Pornit/Oprit
cam_normal_on 1/0
//Mod Left Pornit/Oprit
cam_left_on 1/0
//Mod Alien Pornit/Oprit
cam_alien_on 1/0
//Msg Type , 1 = color , 2 =normal , 3 = hud.
cam_msg_type 1/2/3
Instalare:

1. Fisierul camera.amxx il puneti in addons/amxmodx/plugins
2. Fisierul camera.sma il puneti in addons/amxmodx/scripting
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la sfarsitul fisierului:
| Afiseaza codul
camera.amxx

Code: Select all

SMA:
| Afiseaza codul
[code]/* Plugin generated by AMXX-Studio */
/* Original code "Cam by XunTric" */
#include <amxmodx>
#include <engine>
#include <colorchat>

#define PLUGIN "Camera Plugin"
#define VERSION "2.0"
#define AUTHOR "eNd."
#pragma semicolon 1
//Prefix//
new 
const szPrefix[] = "[Prefix]:";
/////////
//Cvar//
new
cam_on, cam_3d_on , cam_top_on , cam_left_on, cam_normal_on, cam_alien_on, cam_msg_type;
/////////
//Bool//
new bool:
CamOn[33], DOn[33], TopOn[33], NormalOn[33], LeftOn[33];
new bool:
Alien3D[33],  AlienTop[33] ,AlienNormal[33], AlienLeft[33];
////////
//Hud//
new
g_bHud;
////////
public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR);
	//////////////////////////////////////////////////////
	//Cvar
	cam_on = register_cvar("cam_on", "1");
	cam_3d_on = register_cvar("cam_3d_on", "1");
	cam_top_on = register_cvar("cam_top_on", "1");
	cam_left_on = register_cvar("cam_left_on", "1");
	cam_normal_on = register_cvar("cam_normal_on", "1");
	cam_alien_on = register_cvar("cam_alien_on", "1");
	//Msg Type , 1 = color , 2 =normal , 3 = hud.
	cam_msg_type = register_cvar("cam_msg_type", "1");
	//Hook
	register_clcmd("say", "hook_say");
	register_clcmd("say_team", "hook_say");
	//////////////////////////////////////////////////////	
}
public hook_say(id) {
	static Arg[192];
	
	read_args(Arg, sizeof(Arg) - 1);
	remove_quotes(Arg);
	
	if(equal(Arg, "/cam", 5) || equal(Arg,"/camera",10)) {
		replace(Arg, sizeof(Arg) - 1, "/", "");
		Menu_Cam(id);
	}	
		
	return PLUGIN_CONTINUE;
}

public plugin_precache()
{
	g_bHud = CreateHudSyncObj();
	precache_model("models/rpgrocket.mdl");
}

public Menu_Cam(id)
{
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	if(!is_user_alive(id) || is_user_bot(id))
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 poti folosi comanda doar cand esti^x03 viu.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s poti folosi comanda doar cand esti viu.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s poti folosi comanda doar cand esti viu.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}
	if(get_pcvar_num(cam_on) && !CamOn[id]) 
		Show_Menu_Cam(id);
	
	else if(!get_pcvar_num(cam_on))
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 pluginul cam este^x03 dezactivat.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s pluginul cam este dezactivat.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s pluginul cam este dezactivat.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}	
	else if(CamOn[id])
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in meniul^x03 cam.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s esti deja in meniul cam.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in meniul cam.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}	
	DOn[id] = false;
	TopOn[id] = false;
	NormalOn[id] = false;
	Alien3D[id] = false;
	AlienTop[id] = false;
	AlienNormal[id] = false;
	AlienLeft[id] = false;
	LeftOn[id] = false;
	ResetFov(id);
	return PLUGIN_HANDLED;
}

public Show_Menu_Cam(id)
{
	new szCam = menu_create("\rVizualizare \dCamera^n\r", "Show_SubMenu_Cam");
	
	menu_additem(szCam, " \rVizualizare \d3D", "1", 0);
	menu_additem(szCam, " \rVizualizare \dde Sus", "2", 0);
	menu_additem(szCam, " \rVizualizare \dNormala", "3", 0);
	menu_additem(szCam, " \rVizualizare \dStanga", "4", 0);
	
	menu_setprop(szCam, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, szCam, 0);
	CamOn[id] = true;
}
public Show_SubMenu_Cam(id, szCam, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(szCam);
		CamOn[id] = false;
		return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new access, callback;
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	menu_item_getinfo(szCam, item, access, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1: Cam3D(id);
			case 2: CamTop(id);
			case 3: CamNormal(id);
			case 4: CamLeft(id);
		}
	menu_destroy(szCam);
	CamOn[id] = false;
	return PLUGIN_HANDLED;
}
public Cam3D(id)
{
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	if(get_pcvar_num(cam_3d_on))
	{
		new sz3D = menu_create("\rVizualizare \d3D^n\r", "Show_SubMenu_3D");
		
		menu_additem(sz3D, " \rVizualizare \d3D", "1", 0);
		menu_additem(sz3D, " \rVizualizare \d3D & Alien", "2", 0);
		
		menu_setprop(sz3D, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, sz3D, 0);
	}
	else
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 modul 3d este^x03 dezactivat.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s modul 3d este dezactivat.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s modul 3d este dezactivat.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}
public CamTop(id)
{
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	if(get_pcvar_num(cam_top_on))
	{
		new szTop = menu_create("\rVizualizare \dTop^n\r", "Show_SubMenu_TOP");
		
		menu_additem(szTop, " \rVizualizare \dTop", "1", 0);
		menu_additem(szTop, " \rVizualizare \dTop & Alien", "2", 0);
		
		menu_setprop(szTop, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, szTop, 0);
	}
	else 
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 modul top este^x03 dezactivat.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s modul top este dezactivat.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s modul top este dezactivat.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}
public CamNormal(id)
{
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	if(get_pcvar_num(cam_normal_on))
	{
		new szNormal = menu_create("\rVizualizare \dNormal^n\r", "Show_SubMenu_NORMAL");
		
		menu_additem(szNormal, " \rVizualizare \dNormal", "1", 0);
		menu_additem(szNormal, " \rVizualizare \dNormal & Alien", "2", 0);
		
		menu_setprop(szNormal, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, szNormal, 0);
	}
	else 
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 modul normal este^x03 dezactivat.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s modul normal este dezactivat.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s modul normal este dezactivat.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}
public CamLeft(id)
{
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	if(get_pcvar_num(cam_left_on))
	{
		new szLeft = menu_create("\rVizualizare \dStanga^n\r", "Show_SubMenu_LEFT");
		
		menu_additem(szLeft, " \rVizualizare \dStanga", "1", 0);
		menu_additem(szLeft, " \rVizualizare \dStanga & Alien", "2", 0);
		
		menu_setprop(szLeft, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, szLeft, 0);
	}
	else 
	{
		switch(get_pcvar_num(cam_msg_type)) {
			case 1: 
			{
				ColorChat(id, GREEN,"%s^x03 %s^x01 modul left este^x03 dezactivat.^x01", szPrefix, szName);	
			}
			case 2: 
			{
				client_print(id, print_chat, "%s %s modul left este dezactivat.", szPrefix, szName);
			}
			case 3:
			{
				set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
				ShowSyncHudMsg(id, g_bHud, "%s %s modul alien este dezactivat.", szPrefix, szName);
			}
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}
public Show_SubMenu_3D(id, sz3D, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(sz3D);
		return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new access, callback;
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	menu_item_getinfo(sz3D, item, access, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1: 
		{
			if(DOn[id])
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 3D.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s esti deja in modul 3D.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul 3D.", szPrefix, szName);
					}
				}
				return PLUGIN_HANDLED;
			}
			else
			{
				DOn[id] = true;
				TopOn[id] = false;
				NormalOn[id] = false;
				LeftOn[id] = false;
				Alien3D[id] = false;
				AlienTop[id] = false;
				AlienNormal[id] = false;
				AlienLeft[id] = false;
				CamOn[id] = false;
				set_view(id, CAMERA_3RDPERSON);
				Show_Menu_Cam(id);
				ResetFov(id);
			}
		}
		case 2: 
		{
			if(get_pcvar_num(cam_alien_on))
			{
				if(Alien3D[id])
				{
					switch(get_pcvar_num(cam_msg_type)) {
						case 1: 
						{
							ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 3D & Alien.^x01", szPrefix, szName);	
						}
						case 2: 
						{
							client_print(id, print_chat, "%s %s esti deja in modul 3D & Alien.", szPrefix, szName);
						}
						case 3:
						{
							set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
							ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul 3D & Alien.", szPrefix, szName);
						}
					}
					return PLUGIN_HANDLED;
				}
				else
				{
					DOn[id] = false;
					TopOn[id] = false;
					NormalOn[id] = false;
					LeftOn[id] = false;
					Alien3D[id] = true;
					AlienTop[id] = false;
					AlienNormal[id] = false;
					AlienLeft[id] = false;
					CamOn[id] = false;
					set_view(id, CAMERA_3RDPERSON);
					Show_Menu_Cam(id);
					SeFov(id);
				}
			}
			else
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
				}
			}
		}
		
	}
	menu_destroy(sz3D);
	return PLUGIN_HANDLED;
}
public Show_SubMenu_TOP(id, szTop, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(szTop);
		return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new access, callback;
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	menu_item_getinfo(szTop, item, access, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1: 
		{
			if(TopOn[id])
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Top.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s esti deja in modul Top.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Top.", szPrefix, szName);
					}
				}
				return PLUGIN_HANDLED;
			}
			else
			{
				DOn[id] = false;
				TopOn[id] = true;
				NormalOn[id] = false;
				LeftOn[id] = false;
				Alien3D[id] = false;
				AlienTop[id] = false;
				AlienNormal[id] = false;
				AlienLeft[id] = false;
				CamOn[id] = false;
				set_view(id, CAMERA_TOPDOWN);
				Show_Menu_Cam(id);
				ResetFov(id);
			}
		}
		case 2: 
		{
			if(get_pcvar_num(cam_alien_on))
			{
				if(AlienTop[id])
				{
					switch(get_pcvar_num(cam_msg_type)) {
						case 1: 
						{
							ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Top & Alien.^x01", szPrefix, szName);	
						}
						case 2: 
						{
							client_print(id, print_chat, "%s %s esti deja in modul Top & Alien.", szPrefix, szName);
						}
						case 3:
						{
							set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
							ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Top & Alien.", szPrefix, szName);
						}
					}
					return PLUGIN_HANDLED;
				}
				else
				{
					DOn[id] = false;
					TopOn[id] = false;
					NormalOn[id] = false;
					LeftOn[id] = false;
					Alien3D[id] = false;
					AlienTop[id] = true;
					AlienNormal[id] = false;
					AlienLeft[id] = false;
					CamOn[id] = false;
					set_view(id, CAMERA_TOPDOWN);
					Show_Menu_Cam(id);
					SeFov(id);
				}
			}
			else
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
				}
			}
		}
		
	}
	menu_destroy(szTop);
	return PLUGIN_HANDLED;
}
public Show_SubMenu_NORMAL(id, szNormal, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(szNormal);
		return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new access, callback;
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	menu_item_getinfo(szNormal, item, access, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1: 
		{
			if(NormalOn[id])
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Normal.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s esti deja in modul Normal.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Normal.", szPrefix, szName);
					}
				}
				return PLUGIN_HANDLED;
			}
			else
			{
				DOn[id] = false;
				TopOn[id] = false;
				NormalOn[id] = true;
				LeftOn[id] = false;
				Alien3D[id] = false;
				AlienTop[id] = false;
				AlienNormal[id] = false;
				AlienLeft[id] = false;
				CamOn[id] = false;
				set_view(id, CAMERA_NONE);
				Show_Menu_Cam(id);
				ResetFov(id);
			}
		}
		case 2: 
		{
			if(get_pcvar_num(cam_alien_on))
			{
				if(AlienNormal[id])
				{
					switch(get_pcvar_num(cam_msg_type)) {
						case 1: 
						{
							ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Normal & Alien.^x01", szPrefix, szName);	
						}
						case 2: 
						{
							client_print(id, print_chat, "%s %s esti deja in modul Normal & Alien.", szPrefix, szName);
						}
						case 3:
						{
							set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
							ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Top & Alien.", szPrefix, szName);
						}
					}
					return PLUGIN_HANDLED;
				}
				else
				{
					DOn[id] = false;
					TopOn[id] = false;
					NormalOn[id] = false;
					LeftOn[id] = false;
					Alien3D[id] = false;
					AlienTop[id] = false;
					AlienNormal[id] = true;
					AlienLeft[id] = false;
					CamOn[id] = false;
					set_view(id, CAMERA_NONE);
					Show_Menu_Cam(id);
					SeFov(id);
				}
			}
			else
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
				}
			}
		}
		
	}
	menu_destroy(szNormal);
	return PLUGIN_HANDLED;
}
public Show_SubMenu_LEFT(id, szLeft, item)
{
	if( item == MENU_EXIT )
	{
		menu_destroy(szLeft);
		return PLUGIN_HANDLED;
	}
	new data[6], iName[64];
	new access, callback;
	new szName[32];
	get_user_name(id, szName, charsmax(szName));
	menu_item_getinfo(szLeft, item, access, data,5, iName, 63, callback);
	
	new key = str_to_num(data);
	
	switch(key)
	{
		case 1: 
		{
			if(LeftOn[id])
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Left.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s esti deja in modul Left.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Left.", szPrefix, szName);
					}
				}
				return PLUGIN_HANDLED;
			}
			else
			{
				DOn[id] = false;
				TopOn[id] = false;
				NormalOn[id] = false;
				LeftOn[id] = true;
				Alien3D[id] = false;
				AlienTop[id] = false;
				AlienNormal[id] = false;
				AlienLeft[id] = false;
				CamOn[id] = false;
				set_view(id, CAMERA_UPLEFT);
				Show_Menu_Cam(id);
				ResetFov(id);
			}
		}
		
		case 2: 
		{
			if(get_pcvar_num(cam_alien_on))
			{
				if(AlienLeft[id])
				{
					switch(get_pcvar_num(cam_msg_type)) {
						case 1: 
						{
							ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Left & Alien.^x01", szPrefix, szName);	
						}
						case 2: 
						{
							client_print(id, print_chat, "%s %s esti deja in modul Left & Alien.", szPrefix, szName);
						}
						case 3:
						{
							set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
							ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Left & Alien.", szPrefix, szName);
						}
					}
					return PLUGIN_HANDLED;
				}
				else
				{
					DOn[id] = false;
					TopOn[id] = false;
					NormalOn[id] = false;
					LeftOn[id] = false;
					Alien3D[id] = false;
					AlienTop[id] = false;
					AlienNormal[id] = false;
					AlienLeft[id] = true;
					CamOn[id] = false;
					set_view(id, CAMERA_UPLEFT);
					Show_Menu_Cam(id);
					SeFov(id);
				}
			}
			else
			{
				switch(get_pcvar_num(cam_msg_type)) {
					case 1: 
					{
						ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);	
					}
					case 2: 
					{
						client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
					case 3:
					{
						set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
						ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
					}
				}
			}
		}
	}
	
	menu_destroy(szLeft);
	return PLUGIN_HANDLED;
}
public SeFov(id)
{
	message_begin(MSG_ONE, get_user_msgid("SetFOV"), {0,0,0}, id);
	write_byte(170);
	message_end();
}
public ResetFov(id)
{
	message_begin(MSG_ONE, get_user_msgid("SetFOV"), {0,0,0}, id);
	write_byte(90);
	message_end();
}[/code]
Image
Image
Image
Image
Image
Restu le descoperiti voi :)

Image
Descarcare:
Nu am mai adaugat .amxx puteti compila singuri.
Last edited by eNd. on 09 Mar 2013, 22:07, edited 2 times in total.
Image
ImageImage
RoyalServer
PyKw
Membru, skill 0
Membru, skill 0
Posts: 71
Joined: 05 Aug 2010, 23:04
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Has thanked: 11 times
Been thanked: 2 times
Contact:

19 Jan 2013, 21:49

Frumos bravo ! O sa il pun pe serverul meu:)
User avatar
eNd.
Membru, skill +1
Membru, skill +1
Posts: 236
Joined: 19 Jan 2013, 21:18
Detinator Steam: Da
CS Status: Whoa...
SteamID: skitaila03
Has thanked: 18 times
Been thanked: 79 times

09 Mar 2013, 16:59

Update 2.0:
  • Adaugare cvaruri noi
  • Optimizare cod
  • Adaugare sistem nou de mesaje
  • Optimizare bool.
Image
ImageImage
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

11 Mar 2013, 10:10

Bravo end un plugin foarte bun :)>-
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
User avatar
anaconda cs
Membru, skill +3
Membru, skill +3
Posts: 1045
Joined: 13 Nov 2012, 06:39
Detinator Steam: Da
Detinator server CS: Dr.InDungi.Ro
SteamID: anaconda_indungi
Location: Iasi
Has thanked: 49 times
Been thanked: 45 times
Contact:

28 Mar 2013, 14:23

Code: Select all

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Modified for www.freakz.ro

cam.sma(1) : error 010: invalid function or declaration

1 Error.
Compile failed!
nu se compileaza :|
Image
Image
User avatar
eNd.
Membru, skill +1
Membru, skill +1
Posts: 236
Joined: 19 Jan 2013, 21:18
Detinator Steam: Da
CS Status: Whoa...
SteamID: skitaila03
Has thanked: 18 times
Been thanked: 79 times

30 Mar 2013, 11:09

Image
ImageImage
User avatar
sDs|Aragon*
Membru, skill +2
Membru, skill +2
Posts: 576
Joined: 29 Dec 2011, 21:38
Detinator Steam: Da
SteamID: Mihai_Parkour10
Reputatie: Fost scripter eXtreamCS
Has thanked: 4 times
Been thanked: 132 times

12 Apr 2013, 15:19

Nu recomand.
Acest plugin poate da mari erori, defapt nu de la plugin.
Functia ce iti seteaza camera uneori face acel jucator invizibil pentru ceilalti jucatori dupa server.
Jucatori devin "Ghost Hunters=))"
User avatar
AHE
Membru, skill +2
Membru, skill +2
Posts: 622
Joined: 01 Oct 2012, 11:20
Detinator Steam: Da
Location: Zimnicea ;x
Has thanked: 66 times
Been thanked: 3 times

12 May 2014, 17:40

Code: Select all

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textaNGJ20.sma(5) : fatal error 100: cannot read from file: "colorchat"

Compilation aborted.
1 Error.
ma ajutati?
Click | Afiseaza codul
Schimb Steam pentru Iteme Site pe Metin2 Legacy.
Un click :o3
Contact: [email protected] [Y!M] | mr.yonutz_zm [SKYPE]
User avatar
K0k0
Membru, skill +3
Membru, skill +3
Posts: 1217
Joined: 13 Feb 2014, 00:25
Detinator Steam: Da
Been thanked: 72 times

12 May 2014, 18:33

AHE wrote:

Code: Select all

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/tmp/textaNGJ20.sma(5) : fatal error 100: cannot read from file: "colorchat"

Compilation aborted.
1 Error.
ma ajutati?
Intri in Addons/amxmodx/scripting/include si creezi un txt cu numele colorchat.inc
si bagi asta in el
#if defined _colorchat_included
#endinput
#endif
#define _colorchat_included

Code: Select all

/* ColorChat Support */
#define NORMAL DontChange
#define GREEN DontChange
#define TEAM_COLOR DontChange
#define RED Red
#define BLUE Blue
#define GREY Grey
#define ColorChat client_print_color
/* ColorChat Support */

enum _:Colors {
	DontChange,
	Red,
	Blue,
	Grey
}

stock const g_szTeamName[Colors][] = 
{
	"UNASSIGNED",
	"TERRORIST",
	"CT",
	"SPECTATOR"
}

stock client_print_color(id, iColor=DontChange, const szMsg[], any:...)
{
	// check if id is different from 0
	if( id && !is_user_connected(id) )
	{
		return 0;
	}

	if( iColor > Grey )
	{
		iColor = DontChange;
	}

	new szMessage[192];
	if( iColor == DontChange )
	{
		szMessage[0] = 0x04;
	}
	else
	{
		szMessage[0] = 0x03;
	}

	new iParams = numargs();
	// Specific player code
	if(id)
	{
		if( iParams == 3 )
		{
			copy(szMessage[1], charsmax(szMessage)-1, szMsg);
		}
		else
		{
			vformat(szMessage[1], charsmax(szMessage)-1, szMsg, 4);
		}

		if( iColor )
		{
			new szTeam[11]; // store current team so we can restore it
			get_user_team(id, szTeam, charsmax(szTeam));

			// set id TeamInfo in consequence
			// so SayText msg gonna show the right color
			Send_TeamInfo(id, id, g_szTeamName[iColor]);

			// Send the message
			Send_SayText(id, id, szMessage);

			// restore TeamInfo
			Send_TeamInfo(id, id, szTeam);
		}
		else
		{
			Send_SayText(id, id, szMessage);
		}
	} 

	// Send message to all players
	else
	{
		// Figure out if at least 1 player is connected
		// so we don't send useless message if not
		// and we gonna use that player as team reference (aka SayText message sender) for color change
		new iPlayers[32], iNum;
		get_players(iPlayers, iNum, "ch");
		if( !iNum )
		{
			return 0;
		}

		new iFool = iPlayers[0];

		new iMlNumber, i, j;
		new Array:aStoreML = ArrayCreate();
		if( iParams >= 5 ) // ML can be used
		{
			for(j=4; j<iParams; j++)
			{
				// retrieve original param value and check if it's LANG_PLAYER value
				if( getarg(j) == LANG_PLAYER )
				{
					i=0;
					// as LANG_PLAYER == -1, check if next parm string is a registered language translation
					while( ( szMessage[ i ] = getarg( j + 1, i++ ) ) ) {}
					if( GetLangTransKey(szMessage) != TransKey_Bad )
					{
						// Store that arg as LANG_PLAYER so we can alter it later
						ArrayPushCell(aStoreML, j++);

						// Update ML array saire so we'll know 1st if ML is used,
						// 2nd how many args we have to alterate
						iMlNumber++;
					}
				}
			}
		}

		// If arraysize == 0, ML is not used
		// we can only send 1 MSG_BROADCAST message
		if( !iMlNumber )
		{
			if( iParams == 3 )
			{
				copy(szMessage[1], charsmax(szMessage)-1, szMsg);
			}
			else
			{
				vformat(szMessage[1], charsmax(szMessage)-1, szMsg, 4);
			}

			if( iColor )
			{
				new szTeam[11];
				get_user_team(iFool, szTeam, charsmax(szTeam));
				Send_TeamInfo(0, iFool, g_szTeamName[iColor]);
				Send_SayText(0, iFool, szMessage);
				Send_TeamInfo(0, iFool, szTeam);
			}
			else
			{
				Send_SayText(0, iFool, szMessage);
			}
		}

		// ML is used, we need to loop through all players,
		// format text and send a MSG_ONE_UNRELIABLE SayText message
		else
		{
			new szTeam[11], szFakeTeam[10];
			
			if( iColor )
			{
				get_user_team(iFool, szTeam, charsmax(szTeam));
				copy(szFakeTeam, charsmax(szFakeTeam), g_szTeamName[iColor]);
			}

			for( i = 0; i < iNum; i++ )
			{
				id = iPlayers[i];

				for(j=0; j<iMlNumber; j++)
				{
					// Set all LANG_PLAYER args to player index ( = id )
					// so we can format the text for that specific player
					setarg(ArrayGetCell(aStoreML, j), _, id);
				}

				// format string for specific player
				vformat(szMessage[1], charsmax(szMessage)-1, szMsg, 4);

				if( iColor )
				{
					Send_TeamInfo(id, iFool, szFakeTeam);
					Send_SayText(id, iFool, szMessage);
					Send_TeamInfo(id, iFool, szTeam);
				}
				else
				{
					Send_SayText(id, iFool, szMessage);
				}
			}
			ArrayDestroy(aStoreML);
		}
	}
	return 1;
}

stock Send_TeamInfo(iReceiver, iPlayerId, szTeam[])
{
	static iTeamInfo = 0;
	if( !iTeamInfo )
	{
		iTeamInfo = get_user_msgid("TeamInfo");
	}
	message_begin(iReceiver ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iTeamInfo, .player=iReceiver);
	write_byte(iPlayerId);
	write_string(szTeam);
	message_end();
}

stock Send_SayText(iReceiver, iPlayerId, szMessage[])
{
	static iSayText = 0;
	if( !iSayText )
	{
		iSayText = get_user_msgid("SayText");
	}
	message_begin(iReceiver ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iSayText, .player=iReceiver);
	write_byte(iPlayerId);
	write_string(szMessage);
	message_end();
}

stock register_dictionary_colored(const filename[])
{
	if( !register_dictionary(filename) )
	{
		return 0;
	}

	new szFileName[256];
	get_localinfo("amxx_datadir", szFileName, charsmax(szFileName));
	format(szFileName, charsmax(szFileName), "%s/lang/%s", szFileName, filename);
	new fp = fopen(szFileName, "rt");
	if( !fp )
	{
		log_amx("Failed to open %s", szFileName);
		return 0;
	}

	new szBuffer[512], szLang[3], szKey[64], szTranslation[256], TransKey:iKey;

	while( !feof(fp) )
	{
		fgets(fp, szBuffer, charsmax(szBuffer));
		trim(szBuffer);

		if( szBuffer[0] == '[' )
		{
			strtok(szBuffer[1], szLang, charsmax(szLang), szBuffer, 1, ']');
		}
		else if( szBuffer[0] )
		{
			strbreak(szBuffer, szKey, charsmax(szKey), szTranslation, charsmax(szTranslation));
			iKey = GetLangTransKey(szKey);
			if( iKey != TransKey_Bad )
			{
				while( replace(szTranslation, charsmax(szTranslation), "!g", "^4") ){}
				while( replace(szTranslation, charsmax(szTranslation), "!t", "^3") ){}
				while( replace(szTranslation, charsmax(szTranslation), "!n", "^1") ){}
				AddTranslation(szLang, iKey, szTranslation[2]);
			}
		}
	}
	
	fclose(fp);
	return 1;
}
dupa acolo in scripting bagi sursa de mai sus si compilezi
TeX
Membru, skill 0
Membru, skill 0
Posts: 2
Joined: 26 Jun 2014, 12:10
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

18 Jul 2014, 17:13

Salut, vroiam sa spun ca nu stiu de unde la-s putea dowlanda, deoare de aici nu pot.
Cosmin
Fost moderator
Fost moderator
Posts: 9362
Joined: 06 Jul 2013, 22:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 547 times

18 Jul 2014, 17:17

| Afiseaza codul
/* Plugin generated by AMXX-Studio */
/* Original code "Cam by XunTric" */
#include <amxmodx>
#include <engine>
#include <colorchat>

#define PLUGIN "Camera Plugin"
#define VERSION "2.0"
#define AUTHOR "eNd."
#pragma semicolon 1
//Prefix//
new 
const szPrefix[] = "[Prefix]:";
/////////
//Cvar//
new
cam_on, cam_3d_on , cam_top_on , cam_left_on, cam_normal_on, cam_alien_on, cam_msg_type;
/////////
//Bool//
new bool:
CamOn[33], DOn[33], TopOn[33], NormalOn[33], LeftOn[33];
new bool:
Alien3D[33],  AlienTop[33] ,AlienNormal[33], AlienLeft[33];
////////
//Hud//
new
g_bHud;
////////
public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR);
   //////////////////////////////////////////////////////
   //Cvar
   cam_on = register_cvar("cam_on", "1");
   cam_3d_on = register_cvar("cam_3d_on", "1");
   cam_top_on = register_cvar("cam_top_on", "1");
   cam_left_on = register_cvar("cam_left_on", "1");
   cam_normal_on = register_cvar("cam_normal_on", "1");
   cam_alien_on = register_cvar("cam_alien_on", "1");
   //Msg Type , 1 = color , 2 =normal , 3 = hud.
   cam_msg_type = register_cvar("cam_msg_type", "1");
   //Hook
   register_clcmd("say", "hook_say");
   register_clcmd("say_team", "hook_say");
   //////////////////////////////////////////////////////   
}
public hook_say(id) {
   static Arg[192];
   
   read_args(Arg, sizeof(Arg) - 1);
   remove_quotes(Arg);
   
   if(equal(Arg, "/cam", 5) || equal(Arg,"/camera",10)) {
      replace(Arg, sizeof(Arg) - 1, "/", "");
      Menu_Cam(id);
   }   
      
   return PLUGIN_CONTINUE;
}

public plugin_precache()
{
   g_bHud = CreateHudSyncObj();
   precache_model("models/rpgrocket.mdl");
}

public Menu_Cam(id)
{
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   if(!is_user_alive(id) || is_user_bot(id))
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 poti folosi comanda doar cand esti^x03 viu.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s poti folosi comanda doar cand esti viu.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s poti folosi comanda doar cand esti viu.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }
   if(get_pcvar_num(cam_on) && !CamOn[id]) 
      Show_Menu_Cam(id);
   
   else if(!get_pcvar_num(cam_on))
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 pluginul cam este^x03 dezactivat.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s pluginul cam este dezactivat.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s pluginul cam este dezactivat.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }   
   else if(CamOn[id])
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in meniul^x03 cam.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s esti deja in meniul cam.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in meniul cam.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }   
   DOn[id] = false;
   TopOn[id] = false;
   NormalOn[id] = false;
   Alien3D[id] = false;
   AlienTop[id] = false;
   AlienNormal[id] = false;
   AlienLeft[id] = false;
   LeftOn[id] = false;
   ResetFov(id);
   return PLUGIN_HANDLED;
}

public Show_Menu_Cam(id)
{
   new szCam = menu_create("\rVizualizare \dCamera^n\r", "Show_SubMenu_Cam");
   
   menu_additem(szCam, " \rVizualizare \d3D", "1", 0);
   menu_additem(szCam, " \rVizualizare \dde Sus", "2", 0);
   menu_additem(szCam, " \rVizualizare \dNormala", "3", 0);
   menu_additem(szCam, " \rVizualizare \dStanga", "4", 0);
   
   menu_setprop(szCam, MPROP_EXIT, MEXIT_ALL);
   menu_display(id, szCam, 0);
   CamOn[id] = true;
}
public Show_SubMenu_Cam(id, szCam, item)
{
   if( item == MENU_EXIT )
   {
      menu_destroy(szCam);
      CamOn[id] = false;
      return PLUGIN_HANDLED;
   }
   new data[6], iName[64];
   new access, callback;
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   menu_item_getinfo(szCam, item, access, data,5, iName, 63, callback);
   
   new key = str_to_num(data);
   
   switch(key)
   {
      case 1: Cam3D(id);
         case 2: CamTop(id);
         case 3: CamNormal(id);
         case 4: CamLeft(id);
      }
   menu_destroy(szCam);
   CamOn[id] = false;
   return PLUGIN_HANDLED;
}
public Cam3D(id)
{
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   if(get_pcvar_num(cam_3d_on))
   {
      new sz3D = menu_create("\rVizualizare \d3D^n\r", "Show_SubMenu_3D");
      
      menu_additem(sz3D, " \rVizualizare \d3D", "1", 0);
      menu_additem(sz3D, " \rVizualizare \d3D & Alien", "2", 0);
      
      menu_setprop(sz3D, MPROP_EXIT, MEXIT_ALL);
      menu_display(id, sz3D, 0);
   }
   else
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 modul 3d este^x03 dezactivat.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s modul 3d este dezactivat.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s modul 3d este dezactivat.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
}
public CamTop(id)
{
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   if(get_pcvar_num(cam_top_on))
   {
      new szTop = menu_create("\rVizualizare \dTop^n\r", "Show_SubMenu_TOP");
      
      menu_additem(szTop, " \rVizualizare \dTop", "1", 0);
      menu_additem(szTop, " \rVizualizare \dTop & Alien", "2", 0);
      
      menu_setprop(szTop, MPROP_EXIT, MEXIT_ALL);
      menu_display(id, szTop, 0);
   }
   else 
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 modul top este^x03 dezactivat.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s modul top este dezactivat.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s modul top este dezactivat.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
}
public CamNormal(id)
{
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   if(get_pcvar_num(cam_normal_on))
   {
      new szNormal = menu_create("\rVizualizare \dNormal^n\r", "Show_SubMenu_NORMAL");
      
      menu_additem(szNormal, " \rVizualizare \dNormal", "1", 0);
      menu_additem(szNormal, " \rVizualizare \dNormal & Alien", "2", 0);
      
      menu_setprop(szNormal, MPROP_EXIT, MEXIT_ALL);
      menu_display(id, szNormal, 0);
   }
   else 
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 modul normal este^x03 dezactivat.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s modul normal este dezactivat.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s modul normal este dezactivat.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
}
public CamLeft(id)
{
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   if(get_pcvar_num(cam_left_on))
   {
      new szLeft = menu_create("\rVizualizare \dStanga^n\r", "Show_SubMenu_LEFT");
      
      menu_additem(szLeft, " \rVizualizare \dStanga", "1", 0);
      menu_additem(szLeft, " \rVizualizare \dStanga & Alien", "2", 0);
      
      menu_setprop(szLeft, MPROP_EXIT, MEXIT_ALL);
      menu_display(id, szLeft, 0);
   }
   else 
   {
      switch(get_pcvar_num(cam_msg_type)) {
         case 1: 
         {
            ColorChat(id, GREEN,"%s^x03 %s^x01 modul left este^x03 dezactivat.^x01", szPrefix, szName);   
         }
         case 2: 
         {
            client_print(id, print_chat, "%s %s modul left este dezactivat.", szPrefix, szName);
         }
         case 3:
         {
            set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
            ShowSyncHudMsg(id, g_bHud, "%s %s modul alien este dezactivat.", szPrefix, szName);
         }
      }
      return PLUGIN_HANDLED;
   }
   return PLUGIN_HANDLED;
}
public Show_SubMenu_3D(id, sz3D, item)
{
   if( item == MENU_EXIT )
   {
      menu_destroy(sz3D);
      return PLUGIN_HANDLED;
   }
   new data[6], iName[64];
   new access, callback;
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   menu_item_getinfo(sz3D, item, access, data,5, iName, 63, callback);
   
   new key = str_to_num(data);
   
   switch(key)
   {
      case 1: 
      {
         if(DOn[id])
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 3D.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s esti deja in modul 3D.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul 3D.", szPrefix, szName);
               }
            }
            return PLUGIN_HANDLED;
         }
         else
         {
            DOn[id] = true;
            TopOn[id] = false;
            NormalOn[id] = false;
            LeftOn[id] = false;
            Alien3D[id] = false;
            AlienTop[id] = false;
            AlienNormal[id] = false;
            AlienLeft[id] = false;
            CamOn[id] = false;
            set_view(id, CAMERA_3RDPERSON);
            Show_Menu_Cam(id);
            ResetFov(id);
         }
      }
      case 2: 
      {
         if(get_pcvar_num(cam_alien_on))
         {
            if(Alien3D[id])
            {
               switch(get_pcvar_num(cam_msg_type)) {
                  case 1: 
                  {
                     ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 3D & Alien.^x01", szPrefix, szName);   
                  }
                  case 2: 
                  {
                     client_print(id, print_chat, "%s %s esti deja in modul 3D & Alien.", szPrefix, szName);
                  }
                  case 3:
                  {
                     set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                     ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul 3D & Alien.", szPrefix, szName);
                  }
               }
               return PLUGIN_HANDLED;
            }
            else
            {
               DOn[id] = false;
               TopOn[id] = false;
               NormalOn[id] = false;
               LeftOn[id] = false;
               Alien3D[id] = true;
               AlienTop[id] = false;
               AlienNormal[id] = false;
               AlienLeft[id] = false;
               CamOn[id] = false;
               set_view(id, CAMERA_3RDPERSON);
               Show_Menu_Cam(id);
               SeFov(id);
            }
         }
         else
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
            }
         }
      }
      
   }
   menu_destroy(sz3D);
   return PLUGIN_HANDLED;
}
public Show_SubMenu_TOP(id, szTop, item)
{
   if( item == MENU_EXIT )
   {
      menu_destroy(szTop);
      return PLUGIN_HANDLED;
   }
   new data[6], iName[64];
   new access, callback;
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   menu_item_getinfo(szTop, item, access, data,5, iName, 63, callback);
   
   new key = str_to_num(data);
   
   switch(key)
   {
      case 1: 
      {
         if(TopOn[id])
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Top.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s esti deja in modul Top.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Top.", szPrefix, szName);
               }
            }
            return PLUGIN_HANDLED;
         }
         else
         {
            DOn[id] = false;
            TopOn[id] = true;
            NormalOn[id] = false;
            LeftOn[id] = false;
            Alien3D[id] = false;
            AlienTop[id] = false;
            AlienNormal[id] = false;
            AlienLeft[id] = false;
            CamOn[id] = false;
            set_view(id, CAMERA_TOPDOWN);
            Show_Menu_Cam(id);
            ResetFov(id);
         }
      }
      case 2: 
      {
         if(get_pcvar_num(cam_alien_on))
         {
            if(AlienTop[id])
            {
               switch(get_pcvar_num(cam_msg_type)) {
                  case 1: 
                  {
                     ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Top & Alien.^x01", szPrefix, szName);   
                  }
                  case 2: 
                  {
                     client_print(id, print_chat, "%s %s esti deja in modul Top & Alien.", szPrefix, szName);
                  }
                  case 3:
                  {
                     set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                     ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Top & Alien.", szPrefix, szName);
                  }
               }
               return PLUGIN_HANDLED;
            }
            else
            {
               DOn[id] = false;
               TopOn[id] = false;
               NormalOn[id] = false;
               LeftOn[id] = false;
               Alien3D[id] = false;
               AlienTop[id] = true;
               AlienNormal[id] = false;
               AlienLeft[id] = false;
               CamOn[id] = false;
               set_view(id, CAMERA_TOPDOWN);
               Show_Menu_Cam(id);
               SeFov(id);
            }
         }
         else
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
            }
         }
      }
      
   }
   menu_destroy(szTop);
   return PLUGIN_HANDLED;
}
public Show_SubMenu_NORMAL(id, szNormal, item)
{
   if( item == MENU_EXIT )
   {
      menu_destroy(szNormal);
      return PLUGIN_HANDLED;
   }
   new data[6], iName[64];
   new access, callback;
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   menu_item_getinfo(szNormal, item, access, data,5, iName, 63, callback);
   
   new key = str_to_num(data);
   
   switch(key)
   {
      case 1: 
      {
         if(NormalOn[id])
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Normal.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s esti deja in modul Normal.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Normal.", szPrefix, szName);
               }
            }
            return PLUGIN_HANDLED;
         }
         else
         {
            DOn[id] = false;
            TopOn[id] = false;
            NormalOn[id] = true;
            LeftOn[id] = false;
            Alien3D[id] = false;
            AlienTop[id] = false;
            AlienNormal[id] = false;
            AlienLeft[id] = false;
            CamOn[id] = false;
            set_view(id, CAMERA_NONE);
            Show_Menu_Cam(id);
            ResetFov(id);
         }
      }
      case 2: 
      {
         if(get_pcvar_num(cam_alien_on))
         {
            if(AlienNormal[id])
            {
               switch(get_pcvar_num(cam_msg_type)) {
                  case 1: 
                  {
                     ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Normal & Alien.^x01", szPrefix, szName);   
                  }
                  case 2: 
                  {
                     client_print(id, print_chat, "%s %s esti deja in modul Normal & Alien.", szPrefix, szName);
                  }
                  case 3:
                  {
                     set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                     ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Top & Alien.", szPrefix, szName);
                  }
               }
               return PLUGIN_HANDLED;
            }
            else
            {
               DOn[id] = false;
               TopOn[id] = false;
               NormalOn[id] = false;
               LeftOn[id] = false;
               Alien3D[id] = false;
               AlienTop[id] = false;
               AlienNormal[id] = true;
               AlienLeft[id] = false;
               CamOn[id] = false;
               set_view(id, CAMERA_NONE);
               Show_Menu_Cam(id);
               SeFov(id);
            }
         }
         else
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
            }
         }
      }
      
   }
   menu_destroy(szNormal);
   return PLUGIN_HANDLED;
}
public Show_SubMenu_LEFT(id, szLeft, item)
{
   if( item == MENU_EXIT )
   {
      menu_destroy(szLeft);
      return PLUGIN_HANDLED;
   }
   new data[6], iName[64];
   new access, callback;
   new szName[32];
   get_user_name(id, szName, charsmax(szName));
   menu_item_getinfo(szLeft, item, access, data,5, iName, 63, callback);
   
   new key = str_to_num(data);
   
   switch(key)
   {
      case 1: 
      {
         if(LeftOn[id])
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Left.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s esti deja in modul Left.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Left.", szPrefix, szName);
               }
            }
            return PLUGIN_HANDLED;
         }
         else
         {
            DOn[id] = false;
            TopOn[id] = false;
            NormalOn[id] = false;
            LeftOn[id] = true;
            Alien3D[id] = false;
            AlienTop[id] = false;
            AlienNormal[id] = false;
            AlienLeft[id] = false;
            CamOn[id] = false;
            set_view(id, CAMERA_UPLEFT);
            Show_Menu_Cam(id);
            ResetFov(id);
         }
      }
      
      case 2: 
      {
         if(get_pcvar_num(cam_alien_on))
         {
            if(AlienLeft[id])
            {
               switch(get_pcvar_num(cam_msg_type)) {
                  case 1: 
                  {
                     ColorChat(id, GREEN,"%s^x03 %s^x01 esti deja in modul^x03 Left & Alien.^x01", szPrefix, szName);   
                  }
                  case 2: 
                  {
                     client_print(id, print_chat, "%s %s esti deja in modul Left & Alien.", szPrefix, szName);
                  }
                  case 3:
                  {
                     set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                     ShowSyncHudMsg(id, g_bHud, "%s %s esti deja in modul Left & Alien.", szPrefix, szName);
                  }
               }
               return PLUGIN_HANDLED;
            }
            else
            {
               DOn[id] = false;
               TopOn[id] = false;
               NormalOn[id] = false;
               LeftOn[id] = false;
               Alien3D[id] = false;
               AlienTop[id] = false;
               AlienNormal[id] = false;
               AlienLeft[id] = true;
               CamOn[id] = false;
               set_view(id, CAMERA_UPLEFT);
               Show_Menu_Cam(id);
               SeFov(id);
            }
         }
         else
         {
            switch(get_pcvar_num(cam_msg_type)) {
               case 1: 
               {
                  ColorChat(id, GREEN,"%s^x03 %s^x01 modul Alien este^x03 dezactivat.^x01", szPrefix, szName);   
               }
               case 2: 
               {
                  client_print(id, print_chat, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
               case 3:
               {
                  set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 12.0);
                  ShowSyncHudMsg(id, g_bHud, "%s %s modul Alien este dezactivat.", szPrefix, szName);
               }
            }
         }
      }
   }
   
   menu_destroy(szLeft);
   return PLUGIN_HANDLED;
}
public SeFov(id)
{
   message_begin(MSG_ONE, get_user_msgid("SetFOV"), {0,0,0}, id);
   write_byte(170);
   message_end();
}
public ResetFov(id)
{
   message_begin(MSG_ONE, get_user_msgid("SetFOV"), {0,0,0}, id);
   write_byte(90);
   message_end();
}
O ai si in primul post dar nu te-ai uitat tu bine.
hApY.eNd
Membru, skill +1
Membru, skill +1
Posts: 295
Joined: 26 Mar 2013, 16:06
Detinator Steam: Da
SteamID: ApY.eNd # CYBERZ.RO
Has thanked: 11 times
Been thanked: 2 times

02 Sep 2014, 19:23

Acest plugin este foarte vechi si este folosit doar pe serverele knife only :) Si nu te da tu drept autor ca nu esti tu :)
Pluginul original :) https://forums.alliedmods.net/showthrea ... 2?p=121912
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 21 guests