08.02.2012, 13:03
So, Do I have to use return 1 or return 0 here?
pawn Код:
public OnPlayerText(playerid, text[])
{
new name[24], string[128], string2[128];
GetPlayerName(playerid, name, 24);
if(ison911[playerid] != 1)
{
format(string, sizeof(string), "%s Says: %s", name, text);
ProxDetector(10.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
}
if(ison911[playerid] == 1)
{
foreach(Player, i)
{
format(string2, sizeof(string2), "[911 CALL]%d: %s", PlayerInfo[playerid][PhoneNumber], text);
if(PlayerInfo[i][Fmember] == 1 || PlayerInfo[i][Fmember] == 2 || PlayerInfo[i][Fmember] == 3 || PlayerInfo[i][Fmember] == 4) SendClientMessage(i, COLOR_PINK, string2);
format(string, sizeof(string), "(Phone)%s Says: %s", name, text);
ProxDetector(10.0, playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
}
}
return 0;
}