Buscar en la comunidad
Mostrando resultados para las etiquetas 'daã±o'.
Encontrado 1 resultado
-
Bueno ustedes con este plugin podrán cambiar el daño de las armas. En la parte de "MULTIPLIER_WEAPONS" agregan o editan las armas que quieren modificar su daño, y en "DMG_MULTIPLIER" modifican el daño. #include #include #pragma semicolon 1 const BITS_GRENADE = ( 1 << 24 ); const MULTIPLIER_WEAPONS = ( ( 1 << CSW_AWP ) | ( 1 << CSW_AK47 ) | ( 1 << CSW_M4A1) ); const Float:DMG_MULTIPLIER = 2.0; new g_iMaxPlayers; #define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers ) public plugin_init() { register_plugin( "Damage Multiplier" , "0.1.0" , "MZ" ); RegisterHam( Ham_TakeDamage , "player" , "fw_HamTakeDamage" ); g_iMaxPlayers = get_maxplayers(); } public fw_HamTakeDamage( iVictim , iInflictor , iAttacker , Float:fDamage , DmgBits ) { if ( IsPlayer( iAttacker ) && ( !( DmgBits & BITS_GRENADE ) && ( MULTIPLIER_WEAPONS & ( 1 << get_user_weapon( iAttacker ) ) ) ) ) { SetHamParamFloat( 4 , fDamage * DMG_MULTIPLIER ); return HAM_HANDLED; } return HAM_IGNORED; } Sorry por las tabulaciones :B, despues agrego las explicaciones, cualquier error avisen.