Raised This Month: $ Target: $400
 0% 

Max player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Process
Junior Member
Join Date: Jan 2015
Location: Banned
Old 01-03-2015 , 05:45   Max player
Reply With Quote #1

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 ...
Process is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode