Raised This Month: $ Target: $400
 0% 

Damage Type


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 05-01-2012 , 09:27   Re: Damage Type
Reply With Quote #5

Set 2.0 value for default.
Set 0.0 value for disable damage from being taken.

Is DAMAGE_AIM defined as 2.0? I think so.

Here's fun.cpp

PHP Code:
 static cell AMX_NATIVE_CALL set_user_godmode(AMX *amxcell *params// set_user_godmode(index, godmode = 0); = 2 params
{
    
/* Sets player godmode. If you want to disable godmode set only first parameter. */
     // params[1] = index
      // params[2] = godmode = 0
   
       // Check index.
       
CHECK_PLAYER(params[1]);
   
       
// Get player pointer.
       
edict_t *pPlayer MF_GetPlayerEdict(params[1]);
    
       if (
params[2] == 1) {
           
// Enable godmode
           
pPlayer->v.takedamage 0.0;    // 0.0, the player doesn't seem to be able to get hurt.
       
}
        else {
           
// Disable godmode
            
pPlayer->v.takedamage 2.0;    // 2.0 seems to be standard value?
        
}
    
       return 
1;
    } 
__________________

Last edited by claudiuhks; 05-01-2012 at 09:31.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
 



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 07:53.


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