17.02.2013, 18:37
pawn Код:
stock SetPlayerLanguage(playerid, language);
{
if(language == -1) return pLanguage[playerid] = -1;
if(language == 0) return pLanguage[playerid] = 0;
if(language == 1) return pLanguage[playerid] = 1;
if(language == 2) return pLanguage[playerid] = 2;
if(language == 3) return pLanguage[playerid] = 3;
}
pawn Код:
stock SetPlayerLanguage(playerid, language);
{
pLanguage[playerid] = language;
return 1;
}
pawn Код:
stock GetPlayerLanguage(playerid)
{
new lan;
if(pLanguage[playerid] == -1)
{
lan = -1;
}
if(pLanguage[playerid] == 0)
{
lan = 0;
}
if(pLanguage[playerid] == 1)
{
lan = 1;
}
if(pLanguage[playerid] == 2)
{
lan = 2;
}
if(pLanguage[playerid] == 3)
{
lan = 3;
}
if(pLanguage[playerid] == 4)
{
lan = 4;
}
return lan;
}
pawn Код:
#define GetPlayerLanguage(%1) (pLanguage[%1])