VIP 1.9 UPDATE !

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 15:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 35 times

19 Nov 2013, 07:16

.:: Descriere ::.
 
 
 
Cu acest plugin userii care au vip au acces la mai multe iteme !

.:: Instalare ::.
1. Fisierul vip.sma il puneti in addons/amxmodx/scripting
2. Fisierul vip.amxx il puneti in addons/amxmodx/plugins
3. Fisierul buyvip.html il puneti in addons/amxmodx/configs
4. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

vip.amxx
5. Fisierul vips.ini il puneti in addons/amxmodx/configs]
#0000FF

6. Schimbati mapa !
.:: Development (pentru scripteri) ::.
development | Afiseaza codul
[code]
/*///////////////////////////////\\\\\\\\\\
*
*	set_user_vip
*
* 		Type : Native
*
*		Usual : set_user_vip(index, 1=VIP on, 0=VIP OFF)
*/

native set_user_vip(id, value)



/*///////////////////////////////\\\\\\\\\\
*
*	get_user_vip
*
* 		Type : Native
*
*		Usual : return the vip value (1= is vip, 0=is not vip)
*/

native get_user_vip(id)


/*///////////////////////////////\\\\\\\\\\
*
*	vip_putinserver
*
* 		Type : Forward
*
*		Usual : called when VIP is putinserver
*/

forward vip_putinserver(id)


/*///////////////////////////////\\\\\\\\\\
*
*	vip_connect
*
* 		Type : Forward
*
*		Usual : called when VIP is connect to server
*/

forward vip_connect(id)


/*///////////////////////////////\\\\\\\\\\
*
*	vip_disconnect
*
* 		Type : Forward
*
*		Usual : called when VIP is disconnect from server
*/

forward vip_disconnect(id)

/*///////////////////////////////\\\\\\\\\\
*
*	vip_spawn
*
* 		Type : Forward
*
*		Usual : called when VIP is respawning
*/

forward vip_spawn(id)


/*///////////////////////////////\\\\\\\\\\
*
*	vip_die
*
* 		Type : Forward
*
*		Usual : called when VIP die
*/

forward vip_die(id)

/*///////////////////////////////\\\\\\\\\\
*
*	vip_kill
*
* 		Type : Forward
*
*		Usual : called when VIP is kill someone
*/

forward vip_kill(id)


/*///////////////////////////////\\\\\\\\\\
*
*	vip_infochanged
*
* 		Type : Forward
*
*		Usual : called when VIP is change his info(name,rate)
*/

forward vip_infochanged(id)

/*///////////////////////////////\\\\\\\\\\
*
*	vip_think
*
* 		Type : Forward
*
*		Usual : Return PlayerPreThink Function (only for vips)
*/

forward vip_think(id)
[/code]
 
.:: Comenzi chat ::.
  • /vips
  • /vip
  • /vipmenu
  • /buyvip
  • /respawn (doar o data pe runda)
.:: Cvars ::.
  • vip_respawn "2" // de cate ori se poate respawna vip-ul pe runda
.:: Imagini ::.
 Image
 
Image
 
Image
 
 
Image
.:: Descarcare ::.
SMA | Afiseaza codul
/* AMX Mod X
* Vip Mod Plugin
*
* by LordOfNothing
*
* This file is part of AMX Mod X.
*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*/



#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >
#include < fakemeta >

new const PLUGIN [] = "VIP System";
new const VERSION [] = "1.9";
new const AUTHOR [] = "LordOfNothing";

new bool:VipUse[33];
new bool:SpeedOn[33];
new mespawn[33];
new bool:IsVip[33];

new xPut;
new xSpawn;
new xDie;
new xKill;
new xdisc;
new xscan;
new xcon;
new xinfo;

new respawn_cvar;

new bool:g_vip[33];

#define is_user_valid(%1) (1 <= %1 <= get_maxplayers())


#define is_user_vip(%1)    ( IsVip[%1] )

stock set_user_vip(id)
{
	IsVip[id] = true;
}

stock remove_user_vip(id)
{
	IsVip[id] = false;
}

enum Color
{
	NORMAL = 1, // clients scr_concolor cvar color
	YELLOW = 1, // NORMAL alias
	GREEN, // Green Color
	TEAM_COLOR, // Red, grey, blue
	GREY, // grey
	RED, // Red
	BLUE, // Blue
}
 
new TeamName[][] =
{
	"",
	"TERRORIST",
	"CT",	
	"SPECTATOR"
}


//	This is for Read File
new Array:g_Stroke = Invalid_Array;

public plugin_init ( ) {
	
	register_plugin ( PLUGIN, VERSION, AUTHOR );
	RegisterHam(Ham_Spawn, "player", "Hook_Vip_Spawn", 1);
	RegisterHam(Ham_Killed, "player", "HookKilledVip", 1);
	
	register_clcmd ("say /vipmenu", "VipMenu");
	register_clcmd ("say_team /vipmenu", "VipMenu");
	
	register_clcmd("say /vips", "Vips_Online");
	register_clcmd("say_team /vips", "Vips_Online");
	
	register_clcmd("say /vip", "Vips_Online");
	register_clcmd("say_team /vip", "Vips_Online");
	
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
	
	register_clcmd("say /buyvip", "VipBuy");
	register_clcmd("say_team /buyvip", "VipBuy");
	
	register_clcmd("say /respawn","call_respawn");
	
	set_task(60.0,"VIP_msg",0,"",0,"b",0)
	
	register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
	
	
	      
        xPut = CreateMultiForward("vip_putinserver", ET_IGNORE, FP_CELL);
        xSpawn = CreateMultiForward("vip_spawn", ET_IGNORE, FP_CELL);
        xKill = CreateMultiForward("vip_kill", ET_IGNORE, FP_CELL);
        xDie = CreateMultiForward("vip_die", ET_IGNORE, FP_CELL);
        xdisc = CreateMultiForward("vip_disconnect", ET_IGNORE, FP_CELL);
        xscan = CreateMultiForward("vip_think", ET_IGNORE, FP_CELL);
        xcon = CreateMultiForward("vip_connect", ET_IGNORE, FP_CELL);
        xinfo = CreateMultiForward("vip_infochanged", ET_IGNORE, FP_CELL);
        
        
	register_forward(FM_PlayerPreThink, "PlayerIsThink");

	respawn_cvar = register_cvar("vip_respawn","2")
	
}

public plugin_natives()
{

        register_library("vip_api");
        register_native("get_user_vip", "native_get_vip", 1)
        register_native("set_user_vip", "native_set_vip", 1)
}

public native_get_vip(id)
{
        if(!is_user_valid(id))
                return -1;
        
        return g_vip[id];
}


public native_set_vip(id, value)
{
        if(!is_user_valid(id))
                return false;
        
        if(value)
                g_vip[id] = true
        else
                g_vip[id] = false
        
        return true;
}


public HookKilledVip(victim,attacker,shouldgib)
{
        if(is_user_vip(victim) && !is_user_alive(victim))
        {
                new ret;
                ExecuteForward(xDie, ret, victim)
        }
        
        
        if(is_user_vip(attacker) && is_user_alive(attacker))
        {
                new xret;
                ExecuteForward(xKill, xret, attacker)
        }
}

public PlayerIsThink(id)
{
        if(is_user_vip(id))
        {
                new ret;
                ExecuteForward(xscan, ret, id);
        }
}

public call_respawn(id)
{
	if(!is_user_alive(id))
	{
		if(mespawn[id] <= get_pcvar_num(respawn_cvar))
		{
			if(is_user_vip(id))
			{
				ExecuteHam(Ham_CS_RoundRespawn, id);
				ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Ai primit respawn !",PLUGIN);
				mespawn[id] = false;
				new ret;
                		ExecuteForward(xSpawn, ret, id)
				return PLUGIN_HANDLED
				
				
				}else{
				
				ColorChat(0 ,TEAM_COLOR, "^1[ ^4%s^1 ] Nu esti vip !",PLUGIN);
				return PLUGIN_HANDLED
			}
			
			}else{
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Deja ai folosit aceasta comanda !",PLUGIN);
			return PLUGIN_HANDLED
		}
		
		}else{
		ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Deja esti viu !",PLUGIN);
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
}

public event_new_round()
{
	new Players[32] 
	new playerCount, i, player 
	get_players(Players, playerCount, "b") 
	for (i=0; i<playerCount; i++) 
		player = Players 
	mespawn[player] = 0;
}

public VIP_msg(id)
{
	ColorChat(0 ,TEAM_COLOR, "^1[ ^4%s^1 ] Pentru a vedea beneficiile vip tasteaza /buyvip",PLUGIN);
}

public VipBuy(id)
{
	show_motd(id,"addons/amxmodx/configs/buyvip.html");
}

public Vips_Online(id)
{        
	new iPlayers[ 32 ], iNum, iPlayerId, szName[ 32 ] 
	get_players( iPlayers, iNum, "ch" ) 
	
	new iLen, szMessage[ ( sizeof iPlayers ) * charsmax( szName ) ] 
	
	iLen = formatex( szMessage, charsmax( szMessage ), "^1[ ^3VIP-uri Online ^1] : " ) 
	for( new i; i < iNum; i++ ) 
	{ 
		iPlayerId = iPlayers[ i ] 
		if( is_user_vip( iPlayerId ) ) 
		{ 
			get_user_name( iPlayerId, szName, 31 ) 
			iLen += formatex( szMessage[ iLen ], charsmax( szMessage ) - iLen, " ^3%s%s", szName, iLen ? "^1," : "" ) 
		}
	} 
	ColorChat( id, TEAM_COLOR,  szMessage )
	return PLUGIN_HANDLED
}

public client_putinserver(id)
{
	if (!ArraySize(g_Stroke))
	{
		return PLUGIN_CONTINUE;
	}
	
	static Stroke[64], Size = 0;
	
	new name[35]
	get_user_name(id, name, 34); 
	
	
	for (Size = 0; Size < ArraySize(g_Stroke); Size++)
	{
		ArrayGetString(g_Stroke, Size, Stroke, charsmax(Stroke));
		
		if (equal(name, Stroke))
		{
			set_user_vip(id);
			new ret;
                	ExecuteForward(xPut, ret, id)
			
			return PLUGIN_HANDLED;
		}
	}
	
	return PLUGIN_CONTINUE;
}

public client_connect(id)
{
        if(is_user_vip(id))
        {
                new ret;
                ExecuteForward(xcon, ret, id)
                IsVip[id] = false;
        }
}

public client_disconnect(id)
{
        if(is_user_vip(id))
        {
                new ret;
                ExecuteForward(xdisc, ret, id)
                IsVip[id] = false;
        }
        remove_user_vip(id);
}


public Hook_Vip_Spawn(id)
{
	if(is_user_vip(id))
	{
		
		set_task(1.0, "iScoreBoard", id + 6969)
		new ret;
                ExecuteForward(xSpawn, ret, id)
	}
	VipUse[id] = true;
	SpeedOn[id] = false;
}

public iScoreBoard(tID) {
	
	new id = tID - 6969;
	
	message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"));
	write_byte(id);
	write_byte(4);
	message_end();
}

public CurrentWeapon ( id ) 
{
	if(is_user_alive(id) && SpeedOn[id] && is_user_vip(id))
		set_user_maxspeed( id, get_user_maxspeed(id) + 50.0 );
}

public VipMenu(id)
{
	if(is_user_alive(id))
	{
		if(VipUse[id])
		{
			if(is_user_vip(id))
			{
				ShowMenu(id);
				return PLUGIN_HANDLED
				}else{
				ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Nu esti vip!",PLUGIN);
				return PLUGIN_HANDLED
			}
			}else{
			
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Deja ai folosit vip menu !",PLUGIN);
			return PLUGIN_HANDLED
		}
		}else{
		ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Trebuie sa fii in viata ca sa folosesti vip-menu !",PLUGIN);
		return PLUGIN_HANDLED
	}
	return PLUGIN_CONTINUE
}

public client_infochanged(id)
{
        if(is_user_vip(id))
        {
                new ret;
                ExecuteForward(xinfo, ret, id)
                IsVip[id] = false;
        }
}


public ShowMenu ( id ) {   
	
	new menu = menu_create ( "VIP Menu:", "MenuGiver" );
	
	menu_additem ( menu, " Packet 10 HE !", "1", ADMIN_ALL );
	menu_additem ( menu, " Gravitatie !", "2", ADMIN_ALL );
	menu_additem ( menu, " Super Viteza", "3", ADMIN_ALL );
	menu_additem ( menu, " Awp", "4", ADMIN_ALL );
	menu_additem ( menu, " M4a1","5", ADMIN_ALL );
	menu_additem ( menu, " 50 Health", "6", ADMIN_ALL );
	menu_additem ( menu, " Deagle", "7", ADMIN_ALL );
	menu_additem ( menu, " Ak47", "8", ADMIN_ALL );
	menu_additem ( menu, " 5000 $", "9", ADMIN_ALL );
	
	menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
	menu_display ( id, menu, 0 );
	
	return 1;
}

public MenuGiver ( id, menu, item ) {
	
	if ( item == MENU_EXIT )
	{
		return 1;
	}
	
	new data [ 6 ], szName [ 64 ];
	new access, callback;
	new g_Name[33];
	get_user_name(id, g_Name, 32);
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
	
	switch ( key )
	{
		case 1:
		{
			give_item(id, "weapon_hegrenade");
			cs_set_user_bpammo( id, CSW_HEGRENADE, 10 )
			ColorChat(0 ,TEAM_COLOR, "^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4HE-PACHET",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		case 2:
		{
			set_user_gravity(id, 0.7);
			ColorChat(0 ,TEAM_COLOR, "^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4GRAVITATIE",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		case 3:
		{
			ColorChat(0 ,TEAM_COLOR, "^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4VITEZA",PLUGIN,g_Name);
			set_user_maxspeed( id, get_user_maxspeed(id) + 50.0 );
			SpeedOn[id] = true;
			VipUse[id] = false;
		}
		
		case 4:
		{
			give_item(id, "weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 1000);
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4AWP",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		case 5:
		{
			give_item(id, "weapon_m4a1");
			cs_set_user_bpammo(id, CSW_M4A1, 1000);
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4m4a1",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		case 6:
		{
			set_user_health(id, get_user_health(id) + 50);
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4 +50HP",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		case 7:
		{
			give_item(id, "weapon_deagle");
			cs_set_user_bpammo(id, CSW_DEAGLE, 1000);
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4DEAGLE",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		case 8:
		{
			give_item(id, "weapon_ak47");
			cs_set_user_bpammo(id, CSW_AK47, 1000);
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip : ^4Ak47",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		case 9:
		{
			cs_set_user_money(id, cs_get_user_money(id) + 5000);
			ColorChat(0 ,TEAM_COLOR ,"^1[ ^4%s^1 ] Jucatorul ^3%s^1 a ales din meniul de vip :^4 5000 $",PLUGIN,g_Name);
			VipUse[id] = false;
		}
		
		
		
	}
	
	menu_destroy ( menu );
	return 1;
	
}

public plugin_cfg()
{
	static File = 0, Buffer[64], Location[256];
	
	g_Stroke = ArrayCreate(64 /* maximum length */);
	
	get_localinfo("amxx_configsdir", Location, charsmax(Location));
	
	add(Location, charsmax(Location), "/vips.ini ");
	
	if (!file_exists(Location))
	{
		File = fopen(Location, "w+" /* write file */);
		
		if (File)
		{
			fclose(File);
		}
	}
	
	File = fopen(Location, "rt" /* read file as text */);
	
	if (File)
	{
		while (!feof(File))
		{
			fgets(File, Buffer, charsmax(Buffer));
			
			trim(Buffer);
			
			if (!strlen(Buffer) || Buffer[0] == ';')
			{
				continue;
			}
			
			ArrayPushString(g_Stroke, Buffer);
		}
		
		fclose(File);
	}
}

ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
	new message[256];
 
	switch(type)
	{
		case NORMAL: // clients scr_concolor cvar color
		{
			message[0] = 0x01;
		}
		case GREEN: // Green
		{
			message[0] = 0x04;
		}
		default: // White, Red, Blue
		{
			message[0] = 0x03;
		}
	}
	 
	vformat(message[1], 251, msg, 4);
 
	// Make sure message is not longer than 192 character. Will crash the server.
	message[191] = '^0';
 
	new team, ColorChange, index, MSG_Type;
	if(id)
	{
		MSG_Type = MSG_ONE;
		index = id;
	} else {
		index = FindPlayer();
		MSG_Type = MSG_ALL;
	}

	team = get_user_team(index);
	ColorChange = ColorSelection(index, MSG_Type, type);
 

	ShowColorMessage(index, MSG_Type, message);
	if(ColorChange)
	{
		Team_Info(index, MSG_Type, TeamName[team]);
	}
}
 
ShowColorMessage(id, type, message[])
{
	static get_user_msgid_saytext;
	if(!get_user_msgid_saytext)
	{
		get_user_msgid_saytext = get_user_msgid("SayText");
	}
	message_begin(type, get_user_msgid_saytext, _, id);
	write_byte(id)	
	write_string(message);
	message_end();	
}
 
Team_Info(id, type, team[])
{
	static bool:teaminfo_used;
	static get_user_msgid_teaminfo;
	if(!teaminfo_used)
	{
		get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
		teaminfo_used = true;
	}
	message_begin(type, get_user_msgid_teaminfo, _, id);
	write_byte(id);
	write_string(team);
	message_end();
 
	return 1;
}
 
ColorSelection(index, type, Color:Type)
{
	switch(Type)
	{
		case RED:
		{
			return Team_Info(index, type, TeamName[1]);
		}
		case BLUE:
		{
			return Team_Info(index, type, TeamName[2]);
		}
		case GREY:
		{
			return Team_Info(index, type, TeamName[0]);
		}
	}
 
	return 0;
}
 
FindPlayer()
{
	new i = -1;
	static iMaxPlayers;
	if( !iMaxPlayers )
	{
		iMaxPlayers = get_maxplayers( );
	}
	while(i <= iMaxPlayers)
	{
		if(is_user_connected(++i))
			return i;
	}
 
	return -1;
}
Last edited by LordOfNothing on 11 Feb 2014, 11:20, edited 21 times in total.
LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 15:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 35 times

19 Nov 2013, 07:29

* REzervat *

UPDATE :[/b]

1.0
  • - Prima lansare


1.5
  • - scuze pentru greseala de ortografie din imaginea 2 , codul a fost rescris !
    - Iam adaugat o comanda /vips,/vip care afiseaza vip-urile online !
    - Cod rescris !
    - Va afisa un mesaj colorat celorlalti playeri de fiecare daca cand un vip intra/iese dep e server !
    - testat , merge perfect !


1.7
  • - Ca sa dai VIP intri in vips.ini si scri numele vip-ului (recomandat sa intri si in users.ini sai dai slot )


1.9
  • - Am adaugat un nou cvar (vip_resawn "2") - 2 e numarul de cate ori se poate respawna pe runda
    - Am schimbat stocku de mesaj colorat cu altu (ala avea buguri)
    - Am rescris culorile mesajelor (acum arata mai frumos)
    - Am adaugat native si forward-uri !


NOTICE

- Nu uitati ca va trebuie un fisier in configs buyvip.html (ca sa se deschida fereastra de la comanda /buyvip)
- Si un fisier vips.ini (in configs) ca sa dai vip pe NUme , scrieti direct numele , ex :

Mama
Tata

fara ghilimele fara nimic !
Last edited by LordOfNothing on 11 Feb 2014, 11:14, edited 7 times in total.
munir
Membru eXtream
Membru eXtream
Posts: 3193
Joined: 30 Aug 2012, 22:16
Detinator Steam: Da
CS Status: Fost scripter
Detinator server CS: Nu
SteamID: -
Reputatie: Fost super moderator
Restrictie schimbare nume
Nume anterior: falseq, cruyff
Location: Bucuresti
Has thanked: 342 times
Been thanked: 571 times
Contact:

19 Nov 2013, 10:03

Ca o optimizare: Creaza meniul doar odata in plugin_cfg( ) cu o variabila globala, apoi afiseaza-l cu respectiva variabila.
Retras
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

19 Nov 2013, 10:52

Ca update ai putea face cu countdown..
A fool's brain digests philosophy into folly, science into superstition, and art into pedantry.

#RETIRED.
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

19 Nov 2013, 11:27

Bun plugin,ar fi o idee sa faci cu countdown cand expira noclip si celelalte ;)
User avatar
sN1kkeRs.
Membru, skill +3
Membru, skill +3
Posts: 1058
Joined: 19 Sep 2013, 19:43
Detinator Steam: Da
Detinator server CS: Da
SteamID: bzk15
Location: Brăila
Has thanked: 124 times
Been thanked: 37 times

19 Nov 2013, 14:24

Aşa tată :x
Ce mişto e pluginul, felicitări ai +1
LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 15:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 35 times

19 Nov 2013, 16:45

FaTzZu wrote:Ca update ai putea face cu countdown..
dc ma tot ***** peste tot cu countdown ? majoritatea serverelor cad din cauza asta daca nu au un host bun
daca nu ai experienta te rog sa nu mai comentezi




@falseq: nu inteleg , ai putea sa dia un exemplu ?
LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 15:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 35 times

19 Nov 2013, 16:47

UPDATE : va rog sa verificati link : http://www.extreamcs.com/forum/amxmodx/ ... l#p1754279
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

19 Nov 2013, 16:48

@falseq: nu inteleg , ai putea sa dia un exemplu ?
| Afiseaza codul
#include < amxmodx >
#include < engine >



#define PLUGIN "CameraType"
#define VERSION "0.1"


new g_Menu;


public plugin_init( )
{
	register_plugin( PLUGIN, VERSION, "falseq" );
	
	register_clcmd( "say", "Func_Say" );
	register_clcmd( "say_team", "Func_Say" );
}

public plugin_cfg( )
{
	g_Menu = menu_create( "\wCameraType\y:", "cameraHandler" );
	
	menu_additem( g_Menu, "\w3rd \r[ \yPerson\r ]", "1", 0 );
	menu_additem( g_Menu, "\wTop \r[ \yDown\r ]", "2", 0 );
	menu_additem( g_Menu, "\wNormal \r[ \yView\r ]", "3", 0 );
}

public Func_Say( id )
{
	new szSaid[ 192 ];
	read_args( szSaid, sizeof( szSaid ) -1 );
	
	remove_quotes( szSaid );
	
	if( equal( szSaid, "/cam" ) || equal( szSaid, "/camera" ) )
	{
		menu_display( id, g_Menu, 0 );
	}
}

public cameraHandler( id, menu, item )
{
	switch( item )
	{
		case 0:
		{
			set_view( id, CAMERA_3RDPERSON );
		}
		
		case 1:
		{
			set_view( id, CAMERA_TOPDOWN );
		}
		
		case 2:
		{
			set_view( id, CAMERA_NONE );
		}
	}
}
User avatar
R1kKk-
Membru, skill +1
Membru, skill +1
Posts: 178
Joined: 12 Apr 2013, 16:57
Detinator Steam: Da
CS Status: Batman!
Detinator server CS: HNS.JOINET.RO
SteamID: Privat...
Has thanked: 20 times
Been thanked: 17 times
Contact:

19 Nov 2013, 16:55

Bravo, e destul de frumos pluginul :)
Imi place cum ai aranjat public-ul VipMenu :) e destul de optimizat.
La chat color puteai sa faci mai scurt, adica !e - echipa | !v - verde | !n - normal ca sa fie mai usor.
Bafta la mai multe ;)
Image Image Image
LordOfNothing
Membru, skill +1
Membru, skill +1
Posts: 387
Joined: 19 Jul 2013, 15:51
Detinator Steam: Nu
Reputatie: Restrictie PM
Has thanked: 11 times
Been thanked: 35 times

19 Nov 2013, 17:17

Si mie imi place avatarul tau :D
User avatar
R1kKk-
Membru, skill +1
Membru, skill +1
Posts: 178
Joined: 12 Apr 2013, 16:57
Detinator Steam: Da
CS Status: Batman!
Detinator server CS: HNS.JOINET.RO
SteamID: Privat...
Has thanked: 20 times
Been thanked: 17 times
Contact:

19 Nov 2013, 20:43

LordOfNothing wrote:Si mie imi place avatarul tau :D
Eh, ma pricep si eu putin :P\

Am facut si eu un vip, are 785 de linii cu 3 meniuri si 3 accese, fiecare pe o comanda cu cate 3/3/5 iteme 8-| :P pentru modul hns.
Image Image Image
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests