AlliedModders

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

One 12-23-2009 15:41

tag problem
 
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() 
{
    
register_event("DeathMsg""DeathMsg""a");
}
public 
DeathMsg()
{
    new 
attacker read_data(1);
    new 
bool:headshot read_data)
    
    if(
headshot)
    {
        if(
is_user_alive(attacker))
        {
            new 
old_hp get_user_health(attacker)
            
set_user_health(attackerold_hp 50)
            
give_itemattacker"weapon_hegrenade" );
        }
    }
    else
    {
        if(
is_user_alive(attacker))
        {
            new 
old_hp get_user_health(attacker)
            
set_user_health(attackerold_hp 10)
        }
    }


PHP Code:

Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Tag mismatch on line 21
Header size
:            272 bytes
Code size
:              604 bytes
Data size
:              152 bytes
Stack
/heap size:      16384 bytesestimated maxusage=778 cells (3112 bytes)
Total requirements:   17412 bytes

1 Warning
.
Done

WTF?

YamiKaitou 12-23-2009 15:49

Re: tag problem
 
read_data(3) on DeathMsg returns an int, not a bool.

worldspawn 12-23-2009 15:50

Re: tag problem
 
YamiKaitou so fast...

minimiller 12-23-2009 16:15

Re: tag problem
 
:sad face:
you have something against hamsandwiches?
:p

One 12-23-2009 16:33

Re: tag problem
 
omg :) damn my bad :P

@ minimiller : what do you mean?

xPaw 12-23-2009 16:36

Re: tag problem
 
You can do, if you want..

new bool:headshot = bool:read_data( 3 );

One 12-23-2009 16:55

Re: tag problem
 
oh oki :P ty

minimiller 12-23-2009 17:13

Re: tag problem
 
Quote:

Originally Posted by One (Post 1028780)
@ minimiller : what do you mean?

i find ham easier to use than deathmsg
no real reason
xD

One 12-23-2009 17:17

Re: tag problem
 
ok. can u give an example code? realy said : i hate ham :(

platzpatrone 12-23-2009 18:24

Re: tag problem
 
Quote:

Originally Posted by One (Post 1028853)
ok. can u give an example code? realy said : i hate ham :(

maybe some Döner ? :mrgreen:

but with hamsandwich u can do so many things and much easier. dont hate it just give it a try

german:
mit hamcheeseburger kannste ne menge anstellen und vorallem einfacher :) nutze es auch seit paar
wochen weils echt effektiver ist


All times are GMT -4. The time now is 04:11.

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