static Float:Y, Float:X, Float:Z; GetPlayerPos(playerid, X, Y, Z); for(new i, e = GetMaxPlayers(); i != e; i++) { if(IsPlayerInRangeOfPoint(i, 100.0, X, Y, Z)) { if(IsPlayerConnected(i)) { new string[256]; format(string,sizeof(string),"[ID: %d] %s",playerid,text); SendClientMessage(i, -1, text); } } } return 0; }
//Coloca no inнcio do GM, para mais otimizaзгo.
new zName[24];
stock ReturnName(playerid)
{
GetPlayerName(playerid, zName, 24);
return zName;
}
static
Float:cPos[3];
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerInRangeOfPoint(i, 100.0, cPos[0], cPos[1], cPos[2]))
{
if(IsPlayerConnected(i))
{
new string[256];
format(string,sizeof(string),"[%d] %s diz: %s", playerid, ReturnName(playerid), text);
SendClientMessage(i, -1, text);
}
}
}
return 0;
}
PHP Code:
|
Continuou o mesmo problema amigo, sу a mensagem sem o id e nome
![]() OBS: Й pra samp android |
static Float:cPos[3];
GetPlayerPos(playerid, cPos[0], cPos[1], cPos[2]);
new string[128];
for(new i, j = GetPlayerPoolSize(); i <= j; i ++ )
{
if(IsPlayerInRangeOfPoint(i, 100.0, cPos[0], cPos[1], cPos[2]))
{
if(IsPlayerConnected(i))
{
format(string, sizeof(string), "[%d] %s diz: %s", playerid, ReturnName(playerid), text);
SendClientMessage(i, -1, string);
}
}
}
return 0;
}
PHP Code:
|
C:\Users\Administrador\Documents\VE SE VAI\TESTEEE\gamemodes\GM.pwn(2471) : error 017: undefined symbol "GetPlayerPoolSize"
deu esse ъnico erro
Code:
C:\Users\Administrador\Documents\VE SE VAI\TESTEEE\gamemodes\GM.pwn(2471) : error 017: undefined symbol "GetPlayerPoolSize" |
Atualize sua include do samp, ou entгo mantenha o looping como estava, com o MAX_PLAYERS (nгo recomendo) |