Hello,
today I found a code but I did not understand well a part of the script ,
Code:
/* Plugin generated by AMXX-Studio */
#include < amxmodx >
#include < hamsandwich >
#define PLUGIN "Modificare Damage"
#define VERSION "0.1"
#define AUTHOR "hadesownage"
#define IsPlayer(%0) ( 1 <= %0 <= g_iMaxPlayers )
new g_iMaxPlayers;
public plugin_init ( ) {
register_plugin ( PLUGIN, VERSION, AUTHOR );
g_iMaxPlayers = get_maxplayers ( )
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
}
public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage ) {
if ( iInflictor == iAttacker && IsPlayer ( iAttacker ) ) {
SetHamParamFloat ( 4, fDamage * 2.0 );
return HAM_HANDLED;
}
return HAM_IGNORED;
}
this is what i didn't understand
Code:
#define IsPlayer(%0) ( 1 <= %0 <= g_iMaxPlayers )
why its %0 can i replace it with 1 and what is <= and get_maxplayers is it take the max player from server or what !
I'm still learning ...