11.10.2012, 21:29
Indentation!!!
pawn Код:
public OnPlayerText(playerid, text[])
{
if(pOffersHeal[playerid])
{
if(strcmp(text, "Yes", true) == 0)
{
SetPlayerHealth(playerid, HealthAmount);
}
else if(strcmp(text, "No", true) == 0)
{
GameTextForPlayer(playerid, "Canceled heal offer", 3000, 3);
}
return true;
}
new realchat = 1, string[ 128 ];
if(IsPlayerConnected(playerid))
{
if(realchat)
{
if(PlayerInfo[playerid][pAccent] == 0)
{
format(string, sizeof(string), "%s Mowi: %s", RPName(playerid), text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
}
}
else
{
new accent[20];
switch(PlayerInfo[playerid][pAccent])
{
case 1: accent = "Russian";
case 2: accent = "Italian";
case 3: accent = "Germany";
case 4: accent = "Japanese";
case 5: accent = "French";
case 6: accent = "Spain";
case 7: accent = "China";
case 8: accent = "British";
}
format(string, sizeof(string), "%s Mowi: [%s Accent] %s", RPName(playerid), accent, text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_F ADE4,COLOR_FADE5);
}
}
return 1;
}