Command define
#1

How do define it, like:

SendClientMessage(playerid, color, "Hello");

defining into:

SendMessage(playerid, color, "Hello");

?
Reply
#2

i think u have some includes, but wath is thew problem with SendClientMessage to SendMessage, i think no problem but....
Reply
#3

You can use a very simple definition:
pawn Код:
#define SendMessage SendClientMessage
Means the compiler will replace every SendMessage with SendClientMessage on the compilation and vice versa.

Or simply:
pawn Код:
stock SendMessage(playerid,color,message[])
{
    return SendClientMessage(playerid,color,message);
}
Reply
#4

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
You can use a very simple definition:
pawn Код:
#define SendMessage SendClientMessage
Means the compiler will replace every SendMessage with SendClientMessage on the compilation and vice versa.

Or simply:
pawn Код:
stock SendMessage(playerid,color,message[])
{
    return SendClientMessage(playerid,color,message);
}
Thanks!

What about..? ProxDetector?

stock Prox(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
}

then?

forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
Reply
#5

You firstly need to have the stock of ProxDetector, after you have it, you can again,simply,do:
pawn Код:
#define Prox ProxDetector
Or:
pawn Код:
stock Prox(Float:radi,playerid,string[],col1,col2,col3,col4,col5)
{
    return ProxDetector(Float:radi, playerid, string,col1,col2,col3,col4,col5);
}
Reply


Forum Jump:


Users browsing this thread: