Cerere plugin vipi online + hud

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
j a h k 0-
Membru, skill +4
Membru, skill +4
Posts: 1536
Joined: 26 Jan 2016, 10:24
Detinator Steam: Da
CS Status: segmentation fault
SteamID: /ID/jkhalibu
Reputatie: Utilizator neserios
Restrictie moderator [permanent]
Membru Club eXtreamCS (3 luni)
Nume anterior: Jah#
Fond eXtream: 0
Location: Chişinău, Republic Of Moldova
Has thanked: 69 times
Been thanked: 13 times
Contact:

01 Mar 2021, 18:04

Plugin Cerut: Vipi online + hud
Descriere (adica ce face el mai exact): Să afișeze vipii online prin comanda /vips și să apara in tabelul de scoruri flagul este"t" iar hudul sa fie asa http://prntscr.com/10aj5b2 , http://prntscr.com/10aj6ab și daca se poate tot in hud să scrie VIP Status: [ON] Nativele sunt get_user_money , get_user_scraps , get_user_cases , get_user_keys si cu set in loc de get
Serverul impune conditii strict HLDS/REHLDS?: REHLDS
Ai cautat pluginul?(daca da, precizeaza cum): pe google nu am gasit asa ceva
Necesita mod special?: Nu
Configuratie server: AMX Mod X 1.9.0
Tranzactii efectuate cu succes.
| Afiseaza codul
anunturi/vand-cont-rockstar-gta-15euro- ... 49363.html
anunturi/vand-cont-rockstar-gta-euro-paypal-t349373.html
anunturi/cumpar-tema-ipb-t349335.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-60.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-72.html
post2692853.html#p2692853
anunturi/addons-furien-classic-cyby-t348802.html
Image
| Afiseaza codul
Image
Image
RoyalServer
User avatar
robbencsgo
Membru, skill 0
Membru, skill 0
Posts: 96
Joined: 31 Aug 2019, 19:14
Detinator Steam: Da
CS Status: aimer
SteamID: an prevat
Fond eXtream: 0
Has thanked: 9 times
Been thanked: 11 times
Contact:

01 Mar 2021, 21:17

Nu am inteles faza cu Hud-ul, explica mai bine te rog.
Daca te-am ajutat, lasa si tu un +1
lexz
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 921
Joined: 02 Nov 2020, 01:57
Detinator Steam: Da
Fond eXtream: 0
Discord: lexzor#0630
Has thanked: 73 times
Been thanked: 137 times

01 Mar 2021, 23:04

chiar vrei sa arate exact la fel ? ai copiat pluginul de agenti, pana si numele la server e la fel iar acum si hudul :)))

penal
User avatar
j a h k 0-
Membru, skill +4
Membru, skill +4
Posts: 1536
Joined: 26 Jan 2016, 10:24
Detinator Steam: Da
CS Status: segmentation fault
SteamID: /ID/jkhalibu
Reputatie: Utilizator neserios
Restrictie moderator [permanent]
Membru Club eXtreamCS (3 luni)
Nume anterior: Jah#
Fond eXtream: 0
Location: Chişinău, Republic Of Moldova
Has thanked: 69 times
Been thanked: 13 times
Contact:

02 Mar 2021, 00:33

robbencsgo wrote:
01 Mar 2021, 21:17
Nu am inteles faza cu Hud-ul, explica mai bine te rog.
Se vede după poze sa fie un simplu hud ca în poza cu nativele puse mai sus
Tranzactii efectuate cu succes.
| Afiseaza codul
anunturi/vand-cont-rockstar-gta-15euro- ... 49363.html
anunturi/vand-cont-rockstar-gta-euro-paypal-t349373.html
anunturi/cumpar-tema-ipb-t349335.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-60.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-72.html
post2692853.html#p2692853
anunturi/addons-furien-classic-cyby-t348802.html
Image
| Afiseaza codul
Image
Image
User avatar
kidd0x
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1054
Joined: 06 Oct 2018, 14:41
Detinator Steam: Da
SteamID: /id/kidd0x/
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Location: Constangeles
Discord: kidd0x
Has thanked: 172 times
Been thanked: 81 times

02 Mar 2021, 11:10

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>

#pragma semicolon 1
 

#define TASKID 6909

/* native */
native get_user_money(id);
native get_user_scraps(id);
native get_user_cases(id);
native get_user_keys(id);


public client_putinserver(id)
{
   set_task(1.0, "ShowUserDetails", TASKID, _, _, "b");
}

public client_disconnected(id)
{
	remove_task(TASKID);
}

public hudmsg(id)
{
	if(is_user_connected(id) && !is_user_bot(id) && is_user_alive(id))
	{
	new szName[33],
	money = get_user_money(id),
	scraps = get_user_scraps(id),
	cufere = get_user_cases(id),
	keys = get_user_keys(id);
	get_user_name(id,szName,charsmax(szName));

	set_hudmessage(0, 255, 0, 0.01, 0.8, _, _, _ );
	show_hudmessage(id,"[Name: %s]^n[Money: %d | Cases: %d | Keys: %d | Scraps: %d", szName,money,cufere,keys,scraps);

	}
}
User avatar
j a h k 0-
Membru, skill +4
Membru, skill +4
Posts: 1536
Joined: 26 Jan 2016, 10:24
Detinator Steam: Da
CS Status: segmentation fault
SteamID: /ID/jkhalibu
Reputatie: Utilizator neserios
Restrictie moderator [permanent]
Membru Club eXtreamCS (3 luni)
Nume anterior: Jah#
Fond eXtream: 0
Location: Chişinău, Republic Of Moldova
Has thanked: 69 times
Been thanked: 13 times
Contact:

02 Mar 2021, 11:15

N3v3rM1nd wrote:
02 Mar 2021, 11:10

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>

#pragma semicolon 1
 

#define TASKID 6909

/* native */
native get_user_money(id);
native get_user_scraps(id);
native get_user_cases(id);
native get_user_keys(id);


public client_putinserver(id)
{
   set_task(1.0, "ShowUserDetails", TASKID, _, _, "b");
}

public client_disconnected(id)
{
	remove_task(TASKID);
}

public hudmsg(id)
{
	if(is_user_connected(id) && !is_user_bot(id) && is_user_alive(id))
	{
	new szName[33],
	money = get_user_money(id),
	scraps = get_user_scraps(id),
	cufere = get_user_cases(id),
	keys = get_user_keys(id);
	get_user_name(id,szName,charsmax(szName));

	set_hudmessage(0, 255, 0, 0.01, 0.8, _, _, _ );
	show_hudmessage(id,"[Name: %s]^n[Money: %d | Cases: %d | Keys: %d | Scraps: %d", szName,money,cufere,keys,scraps);

	}
}
Poți te rog sa adaugi în plugin /vips și sa apară și în tabelul de scoruri
Tranzactii efectuate cu succes.
| Afiseaza codul
anunturi/vand-cont-rockstar-gta-15euro- ... 49363.html
anunturi/vand-cont-rockstar-gta-euro-paypal-t349373.html
anunturi/cumpar-tema-ipb-t349335.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-60.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-72.html
post2692853.html#p2692853
anunturi/addons-furien-classic-cyby-t348802.html
Image
| Afiseaza codul
Image
Image
User avatar
kidd0x
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1054
Joined: 06 Oct 2018, 14:41
Detinator Steam: Da
SteamID: /id/kidd0x/
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Location: Constangeles
Discord: kidd0x
Has thanked: 172 times
Been thanked: 81 times

02 Mar 2021, 11:17

j a h k 0- wrote:
02 Mar 2021, 11:15
N3v3rM1nd wrote:
02 Mar 2021, 11:10

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>

#pragma semicolon 1
 

#define TASKID 6909

/* native */
native get_user_money(id);
native get_user_scraps(id);
native get_user_cases(id);
native get_user_keys(id);


public client_putinserver(id)
{
   set_task(1.0, "ShowUserDetails", TASKID, _, _, "b");
}

public client_disconnected(id)
{
	remove_task(TASKID);
}

public hudmsg(id)
{
	if(is_user_connected(id) && !is_user_bot(id) && is_user_alive(id))
	{
	new szName[33],
	money = get_user_money(id),
	scraps = get_user_scraps(id),
	cufere = get_user_cases(id),
	keys = get_user_keys(id);
	get_user_name(id,szName,charsmax(szName));

	set_hudmessage(0, 255, 0, 0.01, 0.8, _, _, _ );
	show_hudmessage(id,"[Name: %s]^n[Money: %d | Cases: %d | Keys: %d | Scraps: %d", szName,money,cufere,keys,scraps);

	}
}
Poți te rog sa adaugi în plugin /vips și sa apară și în tabelul de scoruri
AI o nativa pentru vip sau iti fac de la 0 ? ma refer pentru trb asta
și daca se poate tot in hud să scrie VIP Status: [ON
User avatar
j a h k 0-
Membru, skill +4
Membru, skill +4
Posts: 1536
Joined: 26 Jan 2016, 10:24
Detinator Steam: Da
CS Status: segmentation fault
SteamID: /ID/jkhalibu
Reputatie: Utilizator neserios
Restrictie moderator [permanent]
Membru Club eXtreamCS (3 luni)
Nume anterior: Jah#
Fond eXtream: 0
Location: Chişinău, Republic Of Moldova
Has thanked: 69 times
Been thanked: 13 times
Contact:

02 Mar 2021, 11:28

N3v3rM1nd wrote:
02 Mar 2021, 11:17
j a h k 0- wrote:
02 Mar 2021, 11:15
N3v3rM1nd wrote:
02 Mar 2021, 11:10

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>

#pragma semicolon 1
 

#define TASKID 6909

/* native */
native get_user_money(id);
native get_user_scraps(id);
native get_user_cases(id);
native get_user_keys(id);


public client_putinserver(id)
{
   set_task(1.0, "ShowUserDetails", TASKID, _, _, "b");
}

public client_disconnected(id)
{
	remove_task(TASKID);
}

public hudmsg(id)
{
	if(is_user_connected(id) && !is_user_bot(id) && is_user_alive(id))
	{
	new szName[33],
	money = get_user_money(id),
	scraps = get_user_scraps(id),
	cufere = get_user_cases(id),
	keys = get_user_keys(id);
	get_user_name(id,szName,charsmax(szName));

	set_hudmessage(0, 255, 0, 0.01, 0.8, _, _, _ );
	show_hudmessage(id,"[Name: %s]^n[Money: %d | Cases: %d | Keys: %d | Scraps: %d", szName,money,cufere,keys,scraps);

	}
}
Poți te rog sa adaugi în plugin /vips și sa apară și în tabelul de scoruri
AI o nativa pentru vip sau iti fac de la 0 ? ma refer pentru trb asta
și daca se poate tot in hud să scrie VIP Status: [ON
nu am native, poti sa faci tu te rog? imi trebuie doar /vips [CSGO Classy] VIPI Online : nume
Si deja sa apara in tabelul de scoruri VIP si daca poti sa adaugi in hudul cu keys scraps etc, VIP Status : Online si daca nu are vip userul respectiv sa fie VIP Status : Offline

ON: Și daca poti sa faci asta si pentru spectator adica cand stau spec pe cineva sa ii vad informatiile... :)
Tranzactii efectuate cu succes.
| Afiseaza codul
anunturi/vand-cont-rockstar-gta-15euro- ... 49363.html
anunturi/vand-cont-rockstar-gta-euro-paypal-t349373.html
anunturi/cumpar-tema-ipb-t349335.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-60.html
anunturi/recomandare-utilizatori-pentru-tranzactii-t323814-72.html
post2692853.html#p2692853
anunturi/addons-furien-classic-cyby-t348802.html
Image
| Afiseaza codul
Image
Image
User avatar
kidd0x
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1054
Joined: 06 Oct 2018, 14:41
Detinator Steam: Da
SteamID: /id/kidd0x/
Reputatie: Utilizator neserios (tepar!)
Fond eXtream: 0
Location: Constangeles
Discord: kidd0x
Has thanked: 172 times
Been thanked: 81 times

02 Mar 2021, 11:32

j a h k 0- wrote:
02 Mar 2021, 11:28
N3v3rM1nd wrote:
02 Mar 2021, 11:17
j a h k 0- wrote:
02 Mar 2021, 11:15


Poți te rog sa adaugi în plugin /vips și sa apară și în tabelul de scoruri
AI o nativa pentru vip sau iti fac de la 0 ? ma refer pentru trb asta
și daca se poate tot in hud să scrie VIP Status: [ON
nu am native, poti sa faci tu te rog? imi trebuie doar /vips [CSGO Classy] VIPI Online : nume
Si deja sa apara in tabelul de scoruri VIP si daca poti sa adaugi in hudul cu keys scraps etc, VIP Status : Online si daca nu are vip userul respectiv sa fie VIP Status : Offline

ON: Și daca poti sa faci asta si pentru spectator adica cand stau spec pe cineva sa ii vad informatiile... :)
Vezi asa , sincer nu mai tin minte unde erau pos-urile pentru hud pe timer ..

Code: Select all

#include <amxmodx>
#include <cstrike>
#include <fun>

#pragma semicolon 1

#define VF ADMIN_LEVEL_H // flag vip 

#define DEAD (1<<0)
#define VIP (1<<2)

#define TASKID 6909

#define CHAT_PREFIX "^4[^3CSGO Classy^4]"

#define RED Red
#define BLUE Blue
#define GREY Grey
#define ColorChat client_print_color

enum {
	Grey = 33,
	Red,
	Blue
};

/* native */
native get_user_money(id);
native get_user_scraps(id);
native get_user_cases(id);
native get_user_keys(id);

new const gComenzi[][] = {"say /vips", "say_team /vips"};
new MaxPlayers;
public plugin_init() 
{
	register_message(get_user_msgid("ScoreAttrib"), "VipInTab");
	MaxPlayers = get_maxplayers ();

	for(new comenzi; comenzi < sizeof(gComenzi); ++comenzi)	register_clcmd(gComenzi[comenzi], "ShowVipList");
}
public client_putinserver(id)
{
   set_task(1.0, "ShowUserDetails", TASKID, _, _, "b");
}

public client_disconnected(id)
{
	remove_task(TASKID);
}

public hudmsg(id)
{
	if(is_user_connected(id) && !is_user_bot(id) && is_user_alive(id))
	{
	new szName[33],
	money = get_user_money(id),
	scraps = get_user_scraps(id),
	cufere = get_user_cases(id),
	keys = get_user_keys(id);
	get_user_name(id,szName,charsmax(szName));

	set_hudmessage(0, 255, 0, 0.01, 0.8, _, _, _ );
	if(is_vip(id))	show_hudmessage(id,"[Name: %s]^n[Money: %d | Cases: %d | Keys: %d | Scraps: %d^nVIP Status: [ON]", szName,money,cufere,keys,scraps);
	else if(!is_vip(id))	show_hudmessage(id,"[Name: %s]^n[Money: %d | Cases: %d | Keys: %d | Scraps: %d^nVIP Status: [OFF]", szName,money,cufere,keys,scraps);
	}
}

public VipInTab() 
{
	new id = get_msg_arg_int(1);
	if(is_user_connected(id) && (get_user_flags(id) & VF))
		set_msg_arg_int(2, ARG_BYTE, is_user_alive(id) ? VIP : DEAD);
}


public ShowVipList(id)
{
		new VipNames [33] [32], Message [256], i, count, x, len;
	
	for ( i = 1 ; i <= MaxPlayers; i ++ )
	{
		if ( is_user_connected ( i ) && is_vip ( i ) )
		{
			get_user_name ( i, VipNames [count ++], charsmax ( VipNames [ ] ) );
		}
	}
	
	len = format ( Message, charsmax ( Message ), "%s^1 VIP-ii online sunt:^4 ", CHAT_PREFIX );
	
	if ( count > 0 ) 
	{
		for ( x = 0 ; x < count ; x ++ ) 
		{
			len += format ( Message [len], charsmax ( Message ) - len, "%s%s ", VipNames [x], x < (count-1) ? ", ":"" );
			
			if ( len > 96 ) 
			{
				client_print_color ( id, id, Message );
				
				len = format ( Message, 255, " " );
			}
		}
		
		client_print_colorx ( id, id, Message );
	}
	else 
	{
		client_print_colorx ( id, id, "%s^1 Nu sunt^4 VIP^1-i online.", CHAT_PREFIX );
	} 
	
	return PLUGIN_CONTINUE;
}

stock client_print_colorx(id, sender, const fmt[], any:...) {
	// check if id is different from 0
	if( id && !is_user_connected(id) )
	{
		return 0;
	}
	
	static const szTeamName[][] =  {
		"",
		"TERRORIST",
		"CT"
	};
	
	new szMessage[192];
	
	new iParams = numargs();
	// Specific player code
	if( id )
	{
		if( iParams == 3 )
		{
			copy(szMessage, charsmax(szMessage), fmt); // copy so message length doesn't exceed critical 192 value
		}
		else
		{
			vformat(szMessage, charsmax(szMessage), fmt, 4);
		}
		
		if( sender > Grey )
		{
			if( sender > Blue )
			{
				sender = id;
			}
			else
			{
				_CC_TeamInfo(id, sender, szTeamName[sender-Grey]);
			}
		}
		_CC_SayText(id, sender, szMessage);
	} 
	
	// Send message to all players
	else
	{
		// Figure out if at least 1 player is connected
		// so we don't execute useless useless code if not
		new iPlayers[32], iNum;
		get_players(iPlayers, iNum, "ch");
		if( !iNum )
		{
			return 0;
		}
		
		new iMlNumber, i, j;
		new Array:aStoreML = ArrayCreate();
		if( iParams >= 5 ) // ML can be used
		{
			for(j=3; 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_ALL message if sender != 0
		if( !iMlNumber ) {
			
			if( iParams == 3 )
			{	
				copy(szMessage, charsmax(szMessage), fmt);
			}
			else
			{
				vformat(szMessage, charsmax(szMessage), fmt, 4);
			}
			if( 0 < sender < Blue ) // if 0 is passed, need to loop
			{
				if( sender > Grey )
				{
					_CC_TeamInfo(0, sender, szTeamName[sender-Grey]);
				}
				_CC_SayText(0, sender, szMessage);
				return 1;
			}
		}
		
		if( sender > Blue )
		{
			sender = 0; // use receiver index
		}
		
		for(--iNum; iNum>=0; iNum--)
		{
			id = iPlayers[iNum];
			
			if( iMlNumber )
			{
				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, charsmax(szMessage), fmt, 4);
			}
			
			if( sender > Grey ) {
				_CC_TeamInfo(id, sender, szTeamName[sender-Grey]);
			}
			_CC_SayText(id, sender, szMessage);
		}
		
		ArrayDestroy(aStoreML);
	}
	return 1;
}

stock _CC_TeamInfo(iReceiver, iSender, szTeam[])	{
	static iTeamInfo = 0;
	if( !iTeamInfo ) 
	{
		iTeamInfo = get_user_msgid("TeamInfo");
	}
	message_begin(iReceiver ? MSG_ONE : MSG_ALL, iTeamInfo, _, iReceiver);
	write_byte(iSender);
	write_string(szTeam);
	message_end();
}

stock _CC_SayText(iReceiver, iSender, szMessage[]) {
	static iSayText = 0;
	if( !iSayText ) {
		iSayText = get_user_msgid("SayText");
	}
	message_begin(iReceiver ? MSG_ONE : MSG_ALL, iSayText, _, iReceiver);
	write_byte(iSender ? iSender : iReceiver);
	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 )
			{
				replace_all(szTranslation, charsmax(szTranslation), "!g", "^4");
				replace_all(szTranslation, charsmax(szTranslation), "!t", "^3");
				replace_all(szTranslation, charsmax(szTranslation), "!n", "^1");
				AddTranslation(szLang, iKey, szTranslation[2]);
			}
		}
	}
	
	fclose(fp);
	return 1;
} 
stock bool: is_vip(id)
{
	if(get_user_flags(id) & VF)	
	{
		return true;
	}
	return false;
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests