stock SayText playerid text lang new stat getLangStat playerid lang ne

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
stock SayText(playerid,text[],lang = 0)
{
new stat = getLangStat(playerid,lang);
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new msg[256];
new actn[32];
new langg[32];
new fakemsg[256];
switch(lang)
{
case 0: langg = "на английском";
case 1: langg = "на японском";
case 2: langg = "на мексиканском";
}
switch(stat)
{
case 0..15: actn = "бормочет";
case 16..50: actn = "пытается сказать";
case 51..80: actn = "молвит";
case 81..100: actn = "говорит";
}
format(msg,256,"%s",randMsg(text,stat));
foreach(new p : Player)
{
if(p == playerid || getLangStat(p,lang) == 100) fakemsg= msg;
else format(fakemsg,256,randMsg(msg,getLangStat(p,lang)));
format(fakemsg,sizeof(fakemsg)," - %s %s %s : %s",sendername,actn,langg,fakemsg);
SendClientMessage(playerid, COLOR_BLUE, fakemsg);
}
return 1;
}