Macros to stock
#1

Hi guys, i have this simple macros:
pawn Код:
#define EMessage(%0,%1,%2)      if(GetPVarInt(%0, "Language") == 1) SendClientMessage(%0, %1, %2)
#define SMessage(%0,%1,%2)      if(GetPVarInt(%0, "Language") == 2) SendClientMessage(%0, %1, %2)
What i was wondering is, how can this be created into a stock, ( or if possible, a macro ) say for example,
pawn Код:
SendMsgInLanguage(playerid, color, Msg);
So, it will detect the 'playerid' 's language, and send it to his correct language :d ( I suck at explaining )

"Language" == 1 - English
"Language" == 2 - Spanish.
Reply
#2

pawn Код:
stock Message(playerid,colour,msg)  {
    if(GetPVarInt(playerid, "Language") == 1) SendClientMessage(payerid, colour, msg);
    else if(GetPVarInt(playerid, "Language") == 2) SendClientMessage(payerid, colour, msg);
}
like this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)