AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help me (https://forums.alliedmods.net/showthread.php?t=172819)

made.tn 11-26-2011 11:24

Help me
 
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich> 
#include <fakemeta> 

public plugin_init() {
     
register_plugin("headshotRestore""1.0""made.tn")
     
RegisterHam(Ham_Killed"player""PlayerKilledPost"1)
}
public 
PlayerKilledPost(victimattackershouldgib) { 
    
    
    if(!
is_user_connected(attacker)) 
        return 
PLUGIN_CONTINUE

    
if(victim == attacker
        return 
PLUGIN_CONTINUE 

    
if(get_pdata_int(victim75) != HIT_HEAD
        return 
PLUGIN_CONTINUE
    
    
if(get_user_health(attacker) == 100)
        
client_print(attackerprint_chat"Your life already is 100")
    else {
    
set_user_health(attacker100)
    
client_print(attackerprint_chat"Your life changed to 100")
    }
     return 
PLUGIN_HANDLED


but there is an error

//// hprestore.sma
// C:\AMX Mod X\files\base\scripting\hprestore.sma(36) : warning 217: loose indentation
// Header size: 564 bytes
// Code size: 984 bytes
// Data size: 448 bytes
// Stack/heap size: 16384 bytes; estimated max. usage=781 cells (3124 bytes)
// Total requirements: 18380 bytes
//
// 1 Warning.
// Done.
//
// Compilation Time: 0,28 sec

Help
and thanks

fl0werD 11-26-2011 11:26

Re: Help me
 
This is not error!

made.tn 11-26-2011 11:30

Re: Help me
 
ok

kramesa 11-26-2011 11:31

Re: Help me
 
PHP Code:

#include <amxmodx> 
#include <amxmisc> 
#include <fun> 
#include <hamsandwich>  
#include <fakemeta>

public plugin_init() 

    
register_plugin("headshotRestore""1.0""made.tn"
    
RegisterHam(Ham_Killed"player""PlayerKilledPost"1


public 
PlayerKilledPost(victimattackershouldgib
{  
    if(!
is_user_connected(attacker))  
        return 
PLUGIN_CONTINUE 
    
    
if(victim == attacker)  
        return 
PLUGIN_CONTINUE  
    
    
if(get_pdata_int(victim75) != HIT_HEAD)  
        return 
PLUGIN_CONTINUE 
    
    
if(get_user_health(attacker) == 100
        
client_print(attackerprint_chat"Your life already is 100"
    else 
    { 
        
set_user_health(attacker100
        
client_print(attackerprint_chat"Your life changed to 100"
    } 
    return 
PLUGIN_HANDLED 


Fixed...

This plugin is better: http://forums.alliedmods.net/showthread.php?p=455096


All times are GMT -4. The time now is 08:33.

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