How to Undef a function that use native?
#1

How to Undef a function that use native?
Reply
#2

What?
Reply
#3

#undef

e.g :

pawn Код:
#undef SetPlayerPos
I'm not sure as i didn't test it before, but give it a try..
Reply
#4

On top you need to

pawn Код:
#define SOMETHING
pawn Код:
#if defined SOMETHING
// do this if its defined
#endif
pawn Код:
#if defined SOMETHING
// use this if it is defined
#else
// not defined, it will do this
#endif
pawn Код:
#if !defined SOMETHING
// not defined, it will do this
#endif
Reply
#5

Quote:
Originally Posted by jordy.kiesebrink
Посмотреть сообщение
pawn Код:
#if defined SOMETHING
// do this if its defined
#endif
pawn Код:
#if defined SOMETHING
// use this if it is defined
#else
// not defined, it will do this
#endif
He wants to undefine it, not to check if it is defined or not..

Код:
This forum requires that you wait 120 seconds between posts. Please try again in 65 seconds.
Reply
#6

pawn Код:
#undef <native>
Undefines the native you specifies. If you're trying to HOOK it, use _ALS_ method of hooking or y_hooks.
Reply
#7

Quote:
Originally Posted by ******
Посмотреть сообщение
Just delete it, but why would you need to remove a native? It still exists.
I am trying to make a hook for native function as it isn't a callback so It can't use y_hooks and _ALS_ I think it can't work.
Reply
#8

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
#undef

e.g :

pawn Код:
#undef SetPlayerPos
I'm not sure as i didn't test it before, but give it a try..
I tried and I doesn't work.
Reply
#9

Quote:
Originally Posted by ******
Посмотреть сообщение
Sure it can use ALS!
Oh! I see. ****** could you give me your skype or some irc's account name in order to discuss some technological topic.
Reply
#10

Quote:
Originally Posted by ******
Посмотреть сообщение
Sure it can use ALS!
I used _ALS_ to hook but there are warnings warning 201: redefinition of constant/macro (symbol "SetPlayerHealth")
warning 201: redefinition of constant/macro (symbol "SetPlayerArmour")

But only two function's hook have warning, why?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)