Nevoie om priceput ZP

Discutii despre tot ce nu se incadreaza in celelalte categorii.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
gloryous
Membru eXtream
Membru eXtream
Posts: 3611
Joined: 04 Aug 2012, 14:13
Detinator Steam: Da
CS Status: Lazy but smart!
Reputatie: Restrictie moderator
Membru Club eXtreamCS (4 luni)
Location: Luxembourg District
Has thanked: 160 times
Been thanked: 190 times
Contact:

21 Dec 2013, 19:25

Am bagat un plugin VIP pentru serverul meu de ZM dar nu ii da 500 hp playerului cu VIP..undeva undeva e 100 HP maxim cred :)

Postez aici ca e mai mare activitatea si am nevoie de raspuns urgent
PLUGIN | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <fun>
#include <fakemeta>
#include <zombieplague>



/*
Player should have flag Q in users.ini for vip 1
Player should have flag R in users.ini for vip 2

Each VIP 1 player will receive on each round:

500 hp
150 armour
1/2 gravity
semi-visibility
Huge light aura
Word BOMB next to name in scoreboard

--------------------------------------------

Each VIP 2 player will receive on each round:

400 hp
120 armour
70% of gravity
*/

#define VIP1_FLAG ADMIN_LEVEL_E
#define VIP2_FLAG ADMIN_LEVEL_F

enum
{
	SCOREATTRIB_ARG_PLAYERID = 1,
	SCOREATTRIB_ARG_FLAGS
};

enum ( <<= 1 )
{
	SCOREATTRIB_FLAG_NONE = 0,
	SCOREATTRIB_FLAG_DEAD = 1,
	SCOREATTRIB_FLAG_BOMB,
	SCOREATTRIB_FLAG_VIP
};

public plugin_init() 
{
	register_plugin( "[ZP] Addon: VIP1&2", "1.0", "fiendshard" );	
	RegisterHam( Ham_Spawn, "player", "fwdPlayerSpawn", 1 );
}

public fwdPlayerSpawn(id)
{
	if (is_user_alive(id) && (get_user_flags(id) & VIP1_FLAG))
		{
		set_user_health(id, 500) // hp
		set_user_armor(id, 150) // armour
		set_user_gravity(id, 0.50) // gravity
		set_user_rendering(id,kRenderFxNone,0,0,0,kRenderTransAlpha,127) // semi-visibility
		set_pev(id, pev_effects, pev(id, pev_effects) | EF_BRIGHTLIGHT) // light aura
		}
	if (is_user_alive(id) && (get_user_flags(id) & VIP2_FLAG))
		{
		set_user_health(id, 400) // hp
		set_user_armor(id, 120) // armour
		set_user_gravity(id, 0.70) // gravity
		}
	return HAM_IGNORED
}

public client_putinserver(id)
{		
	if ((get_user_flags(id) & VIP1_FLAG))
	{
		zp_set_user_ammo_packs(id, 20)
	}
	if ((get_user_flags(id) & VIP2_FLAG))
	{
		zp_set_user_ammo_packs(id, 15)
	}
	return PLUGIN_HANDLED;
}

public MessageScoreAttrib(iMsgId, iDest, iReceiver)
{
	new iPlayer = get_msg_arg_int(SCOREATTRIB_ARG_PLAYERID);
	if(access(iPlayer, VIP1_FLAG)) 
	{
		set_msg_arg_int(SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_BOMB);
	}

}
Rapidserver
User avatar
ioang
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1170
Joined: 12 Feb 2011, 14:04
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Reputatie: Fost moderator
Utilizator neserios (tepar)
Fond eXtream: 0
Has thanked: 21 times
Been thanked: 23 times
Contact:

21 Dec 2013, 19:31

la set user health scrie 1000
User avatar
gloryous
Membru eXtream
Membru eXtream
Posts: 3611
Joined: 04 Aug 2012, 14:13
Detinator Steam: Da
CS Status: Lazy but smart!
Reputatie: Restrictie moderator
Membru Club eXtreamCS (4 luni)
Location: Luxembourg District
Has thanked: 160 times
Been thanked: 190 times
Contact:

21 Dec 2013, 19:37

ioang wrote:la set user health scrie 1000
De ce? Vreau 500 :|
User avatar
ioang
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 1170
Joined: 12 Feb 2011, 14:04
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com!
Reputatie: Fost moderator
Utilizator neserios (tepar)
Fond eXtream: 0
Has thanked: 21 times
Been thanked: 23 times
Contact:

21 Dec 2013, 19:41

incearca nu stiu ce sa zic.
Am dat la verificat asta unui scripter si mi-a zis ca totul e in regula deci..nu prea am cu ce sa te ajut.
Momentan acel scripter e off deci nu iti pot da leg cu el.
User avatar
Alex.23
Membru, skill +2
Membru, skill +2
Posts: 729
Joined: 22 Dec 2012, 14:29
Detinator Steam: Nu
CS Status: _|_ WCSB
Has thanked: 40 times
Been thanked: 25 times
Contact:

21 Dec 2013, 19:44

Code: Select all

set_user_health(id, 500) 
		set_user_armor(id, 150) 
De aici le setezi , vezi poate nu ai pus bine flagurile ..
User avatar
gloryous
Membru eXtream
Membru eXtream
Posts: 3611
Joined: 04 Aug 2012, 14:13
Detinator Steam: Da
CS Status: Lazy but smart!
Reputatie: Restrictie moderator
Membru Club eXtreamCS (4 luni)
Location: Luxembourg District
Has thanked: 160 times
Been thanked: 190 times
Contact:

21 Dec 2013, 19:44

ioang wrote:incearca nu stiu ce sa zic.
Am dat la verificat asta unui scripter si mi-a zis ca totul e in regula deci..nu prea am cu ce sa te ajut.
Momentan acel scripter e off deci nu iti pot da leg cu el.
Pluginul e ok insa undeva ZP opreste chestia asta..cred ca e vreun cvar cu max hp humans..ca la zm e..
User avatar
Alex.23
Membru, skill +2
Membru, skill +2
Posts: 729
Joined: 22 Dec 2012, 14:29
Detinator Steam: Nu
CS Status: _|_ WCSB
Has thanked: 40 times
Been thanked: 25 times
Contact:

21 Dec 2013, 19:50

| 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;
}
User avatar
gloryous
Membru eXtream
Membru eXtream
Posts: 3611
Joined: 04 Aug 2012, 14:13
Detinator Steam: Da
CS Status: Lazy but smart!
Reputatie: Restrictie moderator
Membru Club eXtreamCS (4 luni)
Location: Luxembourg District
Has thanked: 160 times
Been thanked: 190 times
Contact:

21 Dec 2013, 19:53

Alex.23 wrote:
| 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;
}
Serverul e ZP si daca fac asta o sa fie probleme la clasele de zm ca au peste 1000 hp...
Poti face ca un anumit flag de admin sa aiba 500 hp sau eu stiu.
Post Reply

Return to “Discutii generale”

  • Information