SA-MP Forums Archive
Sendclientmessage to SCM? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Sendclientmessage to SCM? (/showthread.php?tid=513448)



Sendclientmessage to SCM? - Mey6155 - 16.05.2014

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


Re: Sendclientmessage to SCM? - GWMPT - 16.05.2014

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.


Re: Sendclientmessage to SCM? - Mey6155 - 16.05.2014

Thx, man.


Re: Sendclientmessage to SCM? - Konstantinos - 16.05.2014

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



Re: Sendclientmessage to SCM? - Vince - 16.05.2014

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.


Re: Sendclientmessage to SCM? - Mey6155 - 16.05.2014

Well still thanks guys .


Re: Sendclientmessage to SCM? - GWMPT - 16.05.2014

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.