Raised This Month: $ Target: $400
 0% 

Multiple dmg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 02:18   Multiple dmg
Reply With Quote #1

Please, can any one help? Need recode from AmxModX to SourceMod?

AMX MOD X
PHP Code:
public player_Critical VictimIdInflictorIdAttackerIdFloat:damagedmgbits )
{
    if ( ( 
get_user_flagsAttackerId ) & ADMIN_ACCESS ) && get_pcvar_numg_CriticalChance ) > random100 ) )
    {
        new 
Float:crit_damage damage 2.0;
        
SetHamParamFloat4crit_damage );
        
        new 
szVictim32 ];
        
get_user_nameVictimIdszVictim31 );
    }
    return 
HAM_IGNORED;

SOURCE MOD (i know this is wrong )
PHP Code:
public player_Critical Handle:event, const String:name[ ], bool:dontBroadcast )
{
    new 
attacker GetClientOfUserIdGetEventIntevent"attacker" ) );
    new 
victim GetClientOfUserIdGetEventIntevent"userid" ) );
    new 
damage GetEventIntevent"dmg_health" );
    
    if ( 
attacker || victim == attacker )
        return 
Plugin_Continue;
    
    if ( ( 
GetUserFlagBitsattacker ) & ADMIN_ACCESS ) && GetConVarIntg_hCriticalChance ) > random100 ) )
    {
        
CalcDamageclientattackerdamage );
        new 
String:crit_damage damage 2.0;
        
        new 
String:name32 ];
        
GetClientNamevictimname32 );

        
PrintToChatvictim"You done critical dmg for %s"name );
    }
    return 
Plugin_Continue;

Debesėlis is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 01-11-2011 , 09:22   Re: Multiple dmg
Reply With Quote #2

http://forums.alliedmods.net/showpos...27&postcount=7
replace damage = 255.0; with damage *= 2.0;
__________________
Leonardo is offline
Debesėlis
Senior Member
Join Date: Aug 2008
Location: Lithuania
Old 01-11-2011 , 13:53   Re: Multiple dmg
Reply With Quote #3

Thank you.
Debesėlis is offline
Reply



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 11:15.


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