Cerere modificare flag vip

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
THEKING.
Manager CS
Manager CS
Posts: 3339
Joined: 21 Apr 2012, 17:24
Detinator Steam: Da
CS Status: Away
Detinator server CS: cs.extreamcs.com
SteamID: divinsx
Reputatie: Fost super moderator
Manager CS
Nume anterior: CLAU.
1/3
Location: Romania
Has thanked: 84 times
Been thanked: 74 times

28 Jan 2023, 16:24

Plugin Cerut: Modificarea flagului la /vips . Flagul la vip sa fie T , acum e admin_level_h
Descriere (adica ce face el mai exact): cand tastezi /vips iti arata cine este vip . Vreau sa apara asa [nume server] Vip's online :
Ai cautat pluginul?(daca da, precizeaza cum):
click | Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "VIP Online"
#define VERSION "1.0"
#define AUTHOR "Gabriel"

#define COLOR "^x04"
#define CONTACT "yahoo.com"

#define VIP_ACCESS ADMIN_LEVEL_H

new maxplayers
new gmsgSayText

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /vips", "print_adminlist", 1)
	
	maxplayers = get_maxplayers()
	gmsgSayText = get_user_msgid("SayText")
}
public print_adminlist(user)
{
	new adminnames[33][32]
	new message[256]
	new contactinfo[256], contact[112]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
		if(get_user_flags(id) & VIP_ACCESS)
		get_user_name(id, adminnames[count++], 31)
	
	len = format(message, 255, "%s Vips Online: ",COLOR)
	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, "%s ",COLOR)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, " No one !")
		print_message(user, message)
	}
	
	get_cvar_string("amx_contactinfo", contact, 63)
	if(contact[0])  {
		format(contactinfo, 111, "%s Y!M -- %s", COLOR, contact)
		print_message(user, contactinfo)
	}
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
Serverul impune conditii strict HLDS/REHLDS?:-
Necesita mod special?:-
Versiune AMXX Server:-
RoyalServer 2
User avatar
Doctor whO? <3
Membru, skill +3
Membru, skill +3
Posts: 1196
Joined: 21 Jun 2013, 12:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 109 times
Been thanked: 75 times
Contact:

28 Jan 2023, 16:38

Este deja pe acel flag... πŸ˜’πŸ˜’πŸ˜’
Admin lv h = flagul T πŸ˜’
+ Aici este zona cereri pluginuri nu de modificare.
User avatar
xDark
Membru, skill +1
Membru, skill +1
Posts: 294
Joined: 25 Jul 2013, 20:58
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

31 Jan 2023, 22:12

Uite Aici

Plugin

Code: Select all

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "VIP_Online"
#define VERSION "1.0"
#define AUTHOR "Askhanar"


#define VIP_LEVEL_ACCES ADMIN_LEVEL_H

new cvar_tag;
new cvar_vip_showC;

new gmsgSayText

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");
	
	cvar_tag = register_cvar("amx_vip_tag", "V.I.P");  // AICI ITI PUI NUMELE LA SERVER UNDE ESTE V.I.P  
	
	cvar_vip_showC = register_cvar("amx_vip_show_chat", "1");
	
	gmsgSayText = get_user_msgid("SayText")
}

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;
}

public print_adminlist(user) 
{
	if(get_pcvar_num(cvar_vip_showC))
	{
		new tag[32];
		get_pcvar_string(cvar_tag, tag, charsmax(tag));
	
		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) & VIP_LEVEL_ACCES)
					get_user_name(id, adminnames[count++], charsmax(adminnames[ ]));
	
		len = format(message, 255, "^4[%s] ^3VIP-ii online sunt :^4 " ,tag);
		ColorChat(user,"^4[%s] ^3Add Contact : ^4 Numele de Contact ^1.", tag);
		
		if(count > 0) 
			{
			for(x = 0 ; x < count ; x++) 
				{
				len += format(message[len], 255-len, "%s%s ^1.", adminnames[x], x < (count-1) ? ", ":"");
				if(len > 96) 
				{
					print_message(user, message);
					len = format(message, 255, " ");
				}
				}
			print_message(user, message);
			}
		else 
		{
			ColorChat(user,"^4[%s] ^3Nu sunt ^4VIP-i ^3online ^1.", tag);
			ColorChat(user,"^4[%s] ^3Add Contact : ^4 Numele de Contact ^1.", tag);
		} 
	}
	return PLUGIN_CONTINUE;	 
}

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

/*=================================================================================================================*/
/*----------------------------------------------[ ColorChat ]-----------------------------------------*/
/*=================================================================================================================*/

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4"); // verde
	replace_all(msg, 190, "!y", "^1"); // galben/alb/negru
	replace_all(msg, 190, "!t", "^3"); // rosu/albastru/gri
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(id)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, id);
				write_byte(id);
				write_string(msg);
				message_end();
			}
		}
	} 
}
/*=================================================================================================================*/
/*----------------------------------------------[ ColorChat Sfarsit]---------------------------------*/
/*=================================================================================================================*/


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/
┏━━━━━━━━━━━━━━━━━┓
Ω β€’β—β˜…Furien.CsPower.Roβ˜…β—β€’Ω 
┗━━━━━━━━━━━━━━━━━┛
Contact:
[*]Discord : MrPower#8098
[*]Gmail: [email protected]
[*]Skype: p.pika.nr1
[*]Forum: http://CsPower.Ro/forum/
[*]Server: Furien.CsPower.Ro
[*]Ip Server: 188.212.102.21:27015
User avatar
xDark
Membru, skill +1
Membru, skill +1
Posts: 294
Joined: 25 Jul 2013, 20:58
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Contact:

01 Feb 2023, 16:37

Up!
┏━━━━━━━━━━━━━━━━━┓
Ω β€’β—β˜…Furien.CsPower.Roβ˜…β—β€’Ω 
┗━━━━━━━━━━━━━━━━━┛
Contact:
[*]Discord : MrPower#8098
[*]Gmail: [email protected]
[*]Skype: p.pika.nr1
[*]Forum: http://CsPower.Ro/forum/
[*]Server: Furien.CsPower.Ro
[*]Ip Server: 188.212.102.21:27015
Post Reply

Return to β€œModificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests