Raised This Month: $ Target: $400
 0% 

how to format bit values


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-09-2011 , 13:49   how to format bit values
Reply With Quote #1

i'm trying to log all the parameters of Ham_TakeDamage but for damagebits i get 32 if i fell to my death.
But how do i format it to see which bits are used ?

PHP Code:
public FwdTakeDamagePlayerPre(victiminflictorattackerFloatDamagedamagebits)
{
    
    new 
Data[128];
    
formatex(Datacharsmax(Data), "^nvictim = %i^ninflictor = %i^nattacker = %i^n Damage = %.2f^n bits = %i",
    
victiminflictorattackerDamagedamagebits);
    
    
log_to_file("addons/amxmodx/takedamagelog.txt"Data);

i know this is a bad way to log it, but it's just to see the parameters.

This is the output when i fell to my death:
Code:
L 01/09/2011 - 19:44:10: Log file started (file "cstrike\addons\amxmodx\takedamagelog.txt") (game "cstrike") (amx "1.8.1.3746")
L 01/09/2011 - 19:44:10: 
victim = 1
inflictor = 0
attacker = 0
 Damage = 312.50
 bits = 32
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
 


Thread Tools
Display Modes

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 02:01.


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