Sendclientmessage to SCM?
#1

I saw on a script that I downloaded and removed later that you can shorten SendClientMessage to SCM, how can I do that?

Greatz,
-Mey6155
Reply
#2

That's simple, you just need to use macros.
Something like
pawn Код:
#define SCM(%0,%1,%2)   SendClientMessage(%0,%1,%2)
should do the trick.
Reply
#3

Thx, man.
Reply
#4

Quote:
Originally Posted by Kikito
Посмотреть сообщение
That's simple, you just need to use macros.
Something like
pawn Код:
#define SCM(%0,%1,%2)   SendClientMessage(%0,%1,%2)
should do the trick.
You don't need the parameters at all. Just:
pawn Код:
#define SCM SendClientMessage
Reply
#5

Even though programmers are lazy by definition, this just seems stupid. You can use this as a temporary solution, but it's a small effort to use Search & Replace All.
Reply
#6

Well still thanks guys .
Reply
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You don't need the parameters at all. Just:
pawn Код:
#define SCM SendClientMessage
I know i don't need the parameters, however i still prefer to add them there.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)