08.04.2012, 21:38
Como faзo pra quando falar,sу quem tiver perto ver ?
new Float:p[3], s[128], n[24];
GetPlayerName(playerid, n, 24);
GetPlayerPos(playerid, p[0], p[1], p[2]);
format(s, 128, "%s diz: %s", n, text);
for(new i, j = GetMaxPlayers(); i != j; i++)
{
if(IsPlayerInRangeOfPoint(i, 5, p[0], p[1], p[2]))
{
SendClientMessage(i, -1, s);
}
}
return false;
}
OnPlayerText:
pawn Код:
|
if(text[0] == ';')
{
new Float[3], s[128], n[24];
GetPlayerName(playerid, n, 24);
GetPlayerPos(playerid, p[0], p[1], p[2]);
format(s, 128, "%s diz: %s", n, text);
for(new i, j = GetMaxPlayers(); i != j; i++) {
if(IsPlayerInRangeOfPoint(i, 5, p[0], p[1], p[2])) {
SendClientMessage(i, -1, s);
}
}
return 0;
}
if(text[0] == 'g')
{
new Float[3], s[128], n[24];
GetPlayerName(playerid, n, 24);
GetPlayerPos(playerid, p[0], p[1], p[2]);
format(s, 128, "%s diz: %s", n, text);
for(new i, j = GetMaxPlayers(); i != j; i++) {
if(IsPlayerInRangeOfPoint(i, 15, p[0], p[1], p[2])) {
SendClientMessage(i, -1, s);
}
}
return 0;
}
if(text[0] == 's')
{
new Float[3], s[128], n[24];
GetPlayerName(playerid, n, 24);
GetPlayerPos(playerid, p[0], p[1], p[2]);
format(s, 128, "%s diz: %s", n, text);
for(new i, j = GetMaxPlayers(); i != j; i++) {
if(IsPlayerInRangeOfPoint(i, 5, p[0], p[1], p[2])) {
SendClientMessage(i, -1, s);
}
}
return 0;
}
OnPlayerText:
pawn Код:
|