plugin executare comanda pe toti jucatorii

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
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 20:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

05 Nov 2018, 22:30

Salut am modul de go..unde mai folosesc givedusts/keys etc..si trebuie sa dau pe rand..
amx_givedusts x 1
amx_givedusts y 1
..
daca se poate face un plugin sa dea la toti jucatorii de pe sv?multumesc
RoyalServer 2
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

06 Nov 2018, 09:49

lasă nativele
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 20:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

06 Nov 2018, 19:35

cred ca te referi la comnezi..daca nu nu am sma.
amx_givedusts
amx_givepoints
amx_givekeys
amx_givecases
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

06 Nov 2018, 19:46

nu comenzile, nativele pentru comenzi..un fișier .inc ceva
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 20:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

06 Nov 2018, 19:47

  • #if defined _csgo_remake_included
    #endinput
    #endif

    #define _csgo_remake_included

    //#pragma reqlib csgo_remake

    #if AMXX_VERSION_NUM >= 175
    #pragma reqlib csgo_remake
    #if !defined AMXMODX_NOAUTOLOAD
    #pragma loadlib csgo_remake
    #endif
    #else
    #pragma library csgo_remake
    #endif

    /**
    * Returns a player's points.
    *
    * @param id Player index.
    * @return Amount of points. -1 on error.
    */
    native csgor_get_user_points(id);

    /**
    * Sets a player's points to the desired amount.
    *
    * @param id Player index.
    * @param amount A valid amount of points.
    * @return True on success, false otherwise.
    */
    native csgor_set_user_points(id, amount);

    /**
    * Returns a player's dusts.
    *
    * @param id Player index.
    * @return Amount of dusts. -1 on error.
    */
    native csgor_get_user_dusts(id);

    /**
    * Sets a player's dusts to the desired amount.
    *
    * @param id Player index.
    * @param amount A valid amount of dusts.
    * @return True on success, false otherwise.
    */
    native csgor_set_user_dusts(id, amount);

    /**
    * Returns a player's keys.
    *
    * @param id Player index.
    * @return Amount of keys. -1 on error.
    */
    native csgor_get_user_keys(id);

    /**
    * Sets a player's keys to the desired amount.
    *
    * @param id Player index.
    * @param amount A valid amount of keys.
    * @return True on success, false otherwise.
    */
    native csgor_set_user_keys(id, amount);

    /**
    * Returns a player's cases.
    *
    * @param id Player index.
    * @return Amount of cases. -1 on error.
    */
    native csgor_get_user_cases(id);

    /**
    * Sets a player's cases to the desired amount.
    *
    * @param id Player index.
    * @param amount A valid amount of cases.
    * @return True on success, false otherwise.
    */
    native csgor_set_user_cases(id, amount);

    /**
    * Returns a player's Rang ID. Set Rang name in output.
    *
    * @param id Player index.
    * @param output Output array for rang name.
    * @param len Max length of a output array.
    * @return Player Rang ID. -1 on error.
    */
    native csgor_get_user_rang(id, output[], len);

    /**
    * Sets a player's Rang ID. Set the appropriate amount of kills.
    *
    * @param id Player index.
    * @param rangid A valid Rang ID.
    * @return True on success, false otherwise.
    */
    native csgor_set_user_rang(id, rangid);

    /**
    * Returns a player's amount of skins by specified Skin ID.
    *
    * @param id Player index.
    * @param skinid A valid Skin ID.
    * @return Amount of skins. -1 on error.
    */
    native csgor_get_user_skins(id, skinid);

    /**
    * Sets a player's skins (by specific Skin ID) to desired amount.
    *
    * @param id Player index.
    * @param skinid A valid Skin ID.
    * @param amount A valid amount of skins.
    * @return True on success, false otherwise.
    */
    native csgor_set_user_skins(id, skinid, amount);

    /**
    * Returns whether a player is logged.
    *
    * @param id Player index.
    * @return True if it is, false otherwise.
    */
    native csgor_is_user_logged(id);

    /**
    * Called when a player log in account.
    *
    * @param id Player index forwarding the event.
    */
    forward csgor_user_log_in(id);

    /**
    * Called when a player make assist.
    *
    * @param id Assist index.
    * @param killer Killer index.
    * @param victim Victim index.
    * @param head 1 if HeadShot, 0 otherwise.
    */
    forward csgor_user_assist(id, killer, victim, head);

    /**
    * Called when a player is MVP.
    *
    * @param id MVP index.
    * @param event Event type. (0 - Top Killer, 1 - Planter, 2 - Defuser)
    * @param kills Player's kills.
    */
    forward csgor_user_mvp(id, event, kills);
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

06 Nov 2018, 20:34

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

native csgor_get_user_dusts(id);
native csgor_set_user_dusts(id, amount);
native csgor_get_user_keys(id);
native csgor_set_user_keys(id, amount);
native csgor_get_user_cases(id);
native csgor_set_user_cases(id, amount);
native csgor_get_user_points(id);
native csgor_set_user_points(id, amount);

new szName[ 32 ],iPlayers[ 32 ],iPlayersNum,szFirstArg[ 32 ], szSecondArg[ 10 ]

public plugin_init()
{
	register_clcmd("amx_give_dusts","ClCmdGiveDusts",ADMIN_RCON,"Folosire: amx_give_dusts @ALL <nr>")
	register_clcmd("amx_give_points","ClCmdGivePoints",ADMIN_RCON,"Folosire: amx_give_points @ALL <nr>")
	register_clcmd("amx_give_keys","ClCmdGiveKeys",ADMIN_RCON,"Folosire: amx_give_keys @ALL <nr>")
	register_clcmd("amx_give_cases","ClCmdGiveCases",ADMIN_RCON,"Folosire: amx_give_cases @ALL <nr>")
}

public ClCmdGiveDusts( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_dusts < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iDusts = str_to_num( szSecondArg );
	if( iDusts <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_dusts(iPlayers[ i ],csgor_get_user_dusts(iPlayers[ i ]) +iDusts);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 dusts tuturor jucatorilor!", szName, iDusts );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}

public ClCmdGivePoints( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_points < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iPoints = str_to_num( szSecondArg );
	if( iPoints <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_points(iPlayers[ i ],csgor_get_user_points(iPlayers[ i ]) +iPoints);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 points tuturor jucatorilor!", szName, iPoints );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}

public ClCmdGiveKeys( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_keys < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iKeys = str_to_num( szSecondArg );
	if( iKeys <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_keys(iPlayers[ i ],csgor_get_user_keys(iPlayers[ i ]) +iKeys);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 keys tuturor jucatorilor!", szName, iKeys );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}

public ClCmdGiveCases( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_cases < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iCases = str_to_num( szSecondArg );
	if( iCases <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_cases(iPlayers[ i ],csgor_get_user_cases(iPlayers[ i ]) +iCases);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 cases tuturor jucatorilor!", szName, iCases );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Kyal
Membru, skill 0
Membru, skill 0
Posts: 46
Joined: 01 Sep 2018, 20:50
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

06 Nov 2018, 20:36

mom e ok.daca gasesc ceva prbl te anunt
User avatar
LondoN eXtream
Membru eXtream
Membru eXtream
Posts: 2755
Joined: 10 Oct 2014, 06:21
Detinator Steam: Da
SteamID: /id/london_extreamcs
Reputatie: Fost scripter eXtreamCS
Fost moderator ajutator
Membru Club eXtreamCS (6 luni)
Fond eXtream: 0
Location: Roman, Neamț
Has thanked: 3 times
Been thanked: 12 times

06 Nov 2018, 22:22

Adryyy wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <colorchat>

native csgor_get_user_dusts(id);
native csgor_set_user_dusts(id, amount);
native csgor_get_user_keys(id);
native csgor_set_user_keys(id, amount);
native csgor_get_user_cases(id);
native csgor_set_user_cases(id, amount);
native csgor_get_user_points(id);
native csgor_set_user_points(id, amount);

new szName[ 32 ],iPlayers[ 32 ],iPlayersNum,szFirstArg[ 32 ], szSecondArg[ 10 ]

public plugin_init()
{
	register_clcmd("amx_give_dusts","ClCmdGiveDusts",ADMIN_RCON,"Folosire: amx_give_dusts @ALL <nr>")
	register_clcmd("amx_give_points","ClCmdGivePoints",ADMIN_RCON,"Folosire: amx_give_points @ALL <nr>")
	register_clcmd("amx_give_keys","ClCmdGiveKeys",ADMIN_RCON,"Folosire: amx_give_keys @ALL <nr>")
	register_clcmd("amx_give_cases","ClCmdGiveCases",ADMIN_RCON,"Folosire: amx_give_cases @ALL <nr>")
}

public ClCmdGiveDusts( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_dusts < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iDusts = str_to_num( szSecondArg );
	if( iDusts <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_dusts(iPlayers[ i ],csgor_get_user_dusts(iPlayers[ i ]) +iDusts);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 dusts tuturor jucatorilor!", szName, iDusts );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}

public ClCmdGivePoints( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_points < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iPoints = str_to_num( szSecondArg );
	if( iPoints <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_points(iPlayers[ i ],csgor_get_user_points(iPlayers[ i ]) +iPoints);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 points tuturor jucatorilor!", szName, iPoints );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}

public ClCmdGiveKeys( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_keys < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iKeys = str_to_num( szSecondArg );
	if( iKeys <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_keys(iPlayers[ i ],csgor_get_user_keys(iPlayers[ i ]) +iKeys);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 keys tuturor jucatorilor!", szName, iKeys );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}

public ClCmdGiveCases( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_cases < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iCases = str_to_num( szSecondArg );
	if( iCases <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_cases(iPlayers[ i ],csgor_get_user_cases(iPlayers[ i ]) +iCases);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 cases tuturor jucatorilor!", szName, iCases );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}
Prea mult te complici.
| Afiseaza codul
public ClCmdGivePoints( id,level,cid )
{
	if(!cmd_access(id,level,cid,2))	return console_print(id,"[AMXX]: Nu ai acces!")
	
	read_argv( 1, szFirstArg, sizeof ( szFirstArg ) -1 );
	read_argv( 2, szSecondArg, sizeof ( szSecondArg ) -1 );
	
	if( equal( szFirstArg, "" ) || equal( szSecondArg, "" ) || !str_to_num(szSecondArg) )
	{
		console_print( id, "Folosire - amx_give_points < @ALL > < nr >" )
		return PLUGIN_HANDLED;
	}
	
	new iPoints = str_to_num( szSecondArg );
	if( iPoints <= 0 )
	{
		console_print( id, "Valoarea trebuie sa fie mai mare decat 0!" );
		return PLUGIN_HANDLED;
	}
	
	if( szFirstArg[ 0 ] == '@' )
	{
		switch ( szFirstArg[ 1 ] )
		{
			case 'A':
			{
				if( equal( szFirstArg, "@ALL" ) )
				{
					get_players( iPlayers, iPlayersNum, "ch" );
					for( new i = 0; i < iPlayersNum ; i++ )	csgor_set_user_points(iPlayers[ i ],csgor_get_user_points(iPlayers[ i ]) +iPoints);
					
					get_user_name( id, szName, sizeof ( szName ) -1 );
					ColorChat( 0, RED, "Adminul^x03 %s^x01 le-a dat^x03 %i^x01 points tuturor jucatorilor!", szName, iPoints );
					return PLUGIN_HANDLED;
				}
			}
		}
	}
	return PLUGIN_HANDLED;
}
uite asta poate fi convertita in
| Afiseaza codul
public ClCmdGivePoints ( id, level, cid )
{
	if ( !cmd_access ( id, level, cid, 1 ) )
		return;

	new g_cAmount [ 16 ];
	read_argv ( 1, g_cAmount, charsmax ( g_cAmount ) );

	if ( !str_to_num ( g_cAmount ) )
		return;

	new g_Players [ 32 ], iNum, iID;
	get_players ( g_Players, iNum );
	for ( new i = 0; i < iNum; i++ )
	{
		iID = g_Players [ i ];

		if ( !iID )
			continue;

		csgor_set_user_points ( iID, csgor_get_user_points ( iID ) + str_to_num ( g_cAmount ) );
		

	}

	new Name [ 32 ];
	get_user_name ( id, Name, charsmax ( Name ) );
	client_print ( id, print_chat, "[AMX] Adminul %s a oferit %d puncte jucatorilor.", Name, str_to_num ( g_cAmount ) );
}
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

06 Nov 2018, 23:00

am copiat codul de la askh, n-am mai stat să simplific sau ceva..mi e lene, oricum ai dreptate cu codul tău, nu cred că m-aș fi gândit să fac așa de simplu =)

get_players ( g_Players, iNum ); > get_players ( g_Players, iNum, "ch" ); SAU la if ( !iID || (is_user_bot(iID)||is_user_hltv(iID) ) continue;
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Yandex [Bot] and 33 guests