26.12.2010, 12:33
pawn Код:
stock SM(playerid, COLOR, LINEID[])
{
new File[48];
new MyLanguage[24];
GetPVarString(playerid, "Language", MyLanguage, 24);
format(File, sizeof(File), "Languages/%s.xml", MyLanguage);
new XML:xml = xml_open(File);
if(xml)
{
new Message[128];
xml_get_string(xml, LINEID, Message, 128);
SendClientMessage(playerid, COLOR, Message);
xml_close(xml);
}
}
for example
pawn Код:
SM(playerid, YELLOW, "WELCOME_MESSAGE");
Код:
<WELCOME_MESSAGE>Welcome to my server!</WELCOME_MESSAGE>
pawn Код:
SM(playerid, YELLOW, "WELCOME_MESSAGE", PlayerName);
Код:
<WELCOME_MESSAGE>Welcome %s to my server</WELCOME_MESSAGE>