Macros to stock - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Macros to stock (
/showthread.php?tid=191135)
Macros to stock - [L3th4l] - 18.11.2010
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.
Re: Macros to stock -
(SF)Noobanatior - 18.11.2010
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?