Will this work?
#1

pawn Код:
#define TakeHealth(%1,%2,%3) \
 new \
 Float:Health; \
 GetPlayerHealth ( %1 , Health ); \
 GivePlayerHealth ( %1 , Health - %3 );
I didn't test yet, but did i make this good?
Reply
#2

If you wanna know it, try it out!
And I don't think it's gonna work, try this :P

pawn Код:
#define TakeHealth(%1,%2) \
 new \
 Float:Health; \
 GetPlayerHealth ( %1 , Health ); \
 GivePlayerHealth ( %1 , Health - %2 );
You didn't use the '%2' -.- - so I removed '%3' and replaced the othjer '%3' for '%2'
Reply
#3

ok i find problem this code shoud be like this

pawn Код:
#define TakeHealth(%0,%1) \
    do \
    { \
        new \
                Float:health; \
        GetPlayerHealth ( %0 , health ) ; \
        SetPlayerHealth ( %0 , health - %1 ) ; \
    } \
while(FALSE)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)