03.02.2012, 10:42
Hi, Iґm using this language include for my server :
And, if i call command which use ClientLanguageTextToAll or GameLanguageTextToAll, text (or string) will show only for me
Please, can someone find the problem ?
pawn Код:
#include <foreach>
new PlayerLanguage[MAX_PLAYERS] = 0;
stock SetPlayerLanguage(playerid, language)
{
if(language == 0)
{
return PlayerLanguage[playerid] = 0;
}
if(language == 1)
{
return PlayerLanguage[playerid] = 1;
}
return 1;
}
stock ShowLanguageDialog(playerid, dialogid, style, message0[], message1[], message2[], message3[], message4[], message5[], message6[], message7[])
{
if(PlayerLanguage[playerid] == 0)
{
return ShowPlayerDialog(playerid, dialogid, style, message0, message2, message4, message6);
}
if(PlayerLanguage[playerid] == 1)
{
return ShowPlayerDialog(playerid, dialogid, style, message1, message3, message5, message7);
}
return 1;
}
stock ClientLanguageText(playerid, color, const message0[], const message1[])
{
if(PlayerLanguage[playerid] == 0)
{
return SendClientMessage(playerid, color, message0);
}
if(PlayerLanguage[playerid] == 1)
{
return SendClientMessage(playerid, color, message1);
}
return 1;
}
stock ClientLanguageTextToAll(color, const message0[], const message1[])
{
foreach (Player, i)
{
if(PlayerLanguage[i] == 0)
{
return SendClientMessage(i, color, message0);
}
if(PlayerLanguage[i] == 1)
{
return SendClientMessage(i, color, message1);
}
}
return 1;
}
stock GameLanguageText(playerid, const message0[], const message1[], time, style)
{
if(PlayerLanguage[playerid] == 0)
{
return GameTextForPlayer(playerid, message0, time, style);
}
if(PlayerLanguage[playerid] == 1)
{
return GameTextForPlayer(playerid, message1, time, style);
}
return 1;
}
stock GameLanguageTextToAll(const message0[], const message1[], time, style)
{
foreach (Player, i)
{
if(PlayerLanguage[i] == 0)
{
return GameTextForPlayer(i, message0, time, style);
}
if(PlayerLanguage[i] == 1)
{
return GameTextForPlayer(i, message1, time, style);
}
}
return 1;
}
Please, can someone find the problem ?