[rezolvat] Cerere plugin hp maxim

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
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 09:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

29 Oct 2013, 16:26

Am nevoie de un plugin ce seteaza o limita de hp pe sv. meu. Exemplu daca eu setez 200 hp dintr-un cvar sau ce contine pluginul nu au voie sa cumpere sau sa aiba mai mult de 200hp.Multumesc
Image
RoyalServer 2
User avatar
KrAiD.
Fost moderator
Fost moderator
Posts: 866
Joined: 15 Jun 2013, 12:14
Detinator Steam: Da
CS Status: Cat de cat activ :D
Detinator server CS: Nu
Reputatie: Fost Moderator ajutator
0.7 / 3
Has thanked: 14 times
Been thanked: 131 times
Contact:

29 Oct 2013, 16:28

incearca
| Afiseaza codul
#include < amxmodx >
#include < fun >

#pragma semicolon 		1

static const PLUGIN[ ] 		= "Max Health";
static const VERSION[ ] 	= "1.0";

new pCvarHealth;

public plugin_init( ) 
{
	register_plugin( PLUGIN, VERSION, "Unhask" );
	
	register_event( "Health", "MaxHealthPerPlayer", "be" );
	
	pCvarHealth		= register_cvar( "amx_max_health", "250" );
}

public MaxHealthPerPlayer( id )
{
	new iHealth = get_pcvar_num( pCvarHealth );
	
	new _iHealth = get_user_health( id );
	
	if ( _iHealth >= iHealth )
        {
                client_print( id, print_center, "Nu poti avea viata mai mare de %i !", iHealth );
		return 1;
        }
		
	return 1;
}
Cvar
amx_max_health 250 sau cat vrei tu
User avatar
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 09:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

29 Oct 2013, 16:32

Nu merge zice doar ca n-am voie mai mult nu si ma opreste sa-mi mai iau.
Image
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:

29 Oct 2013, 17:10

Code: Select all

#include < amxmodx >
#include < fun >
#include < fakemeta >

#define PLUGIN_NAME ""
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "falseq"

const g_MaxHealth = 100;
const g_DefaultHealth = 100;

public plugin_init( )
{
	register_plugin( PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR );
	
	register_forward( FM_PlayerPreThink, "fwdPlayerPreThink" );
}

public fwdPlayerPreThink( id )
{
	if( get_user_health( id ) > g_MaxHealth )
		set_user_health( id, g_DefaultHealth );
}
Vezi asa.
@N-am cum sa verific cand/cum isi cumpara playerul hp.
Retras
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:

29 Oct 2013, 18:31

am o intrebare, exemplu sunt unele mape pe dr care permit sa iti iei hp pana la infinit, acest plugin opreste asta? adica daca playerul respectiv sta in locul unde se ia hp sa stea degeaba, sa nu ii creasca mai mult decat am setat eu in plungin :-? e posibil asa ceva?
Image
Image
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:

29 Oct 2013, 18:53

anaconda cs wrote:am o intrebare, exemplu sunt unele mape pe dr care permit sa iti iei hp pana la infinit, acest plugin opreste asta? adica daca playerul respectiv sta in locul unde se ia hp sa stea degeaba, sa nu ii creasca mai mult decat am setat eu in plungin :-? e posibil asa ceva?
Sincer, cred ca da. Poti testa. (lasa-mi pm cu serverul respectiv/pe care testezi)
Retras
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:

29 Oct 2013, 19:54

edit: am probat.. e functional dar are buguri.. vad ca unii plyaeri au 500 hp :)) dar nu stiu de unde
Image
Image
User avatar
vladu888
Membru, skill +1
Membru, skill +1
Posts: 272
Joined: 29 Jun 2013, 09:54
Detinator Steam: Nu
CS Status: Joc Furien.
Location: Fagaras,Brasov
Has thanked: 46 times
Been thanked: 13 times
Contact:

29 Oct 2013, 20:31

nu stiu frate si eu am probat si merge.Thanks.
Image
User avatar
Gabriel963
Fost moderator
Fost moderator
Posts: 1658
Joined: 03 Feb 2013, 13:03
Detinator Steam: Da
CS Status: Retried
Reputatie: Membru Club eXtreamCS (1 luna)
Fost Moderator
Location: Bucharest, Romania.
Has thanked: 20 times
Been thanked: 85 times

31 Oct 2013, 17:59

anaconda cs wrote:am o intrebare, exemplu sunt unele mape pe dr care permit sa iti iei hp pana la infinit, acest plugin opreste asta? adica daca playerul respectiv sta in locul unde se ia hp sa stea degeaba, sa nu ii creasca mai mult decat am setat eu in plungin :-? e posibil asa ceva?
Eu la locul cu HP am rezolvat cu un kill block din Building Blocks (mult mai bun ca BlockMaker) -->
| Afiseaza codul
[code]https://forums.alliedmods.net/showthread.php?p=504633[/code]
Image
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests