//OnPlayerCommandText
if(!strcmp(cmd, "/f", true))
{
new tmp[128];
strmid(tmp, cmdtext, 3, strlen(cmdtext), 128);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "/f [texto]");
new
Float:jx,
Float:jy,
Float:jz;
strins(tmp, " (Chat-Prуximo):", 0, 128);
strins(tmp, PlayerName(playerid), 0, 128);
GetPlayerPos(playerid, jx, jy, jz);
for(new j; j < MAX_PLAYERS; j++)
{
if(IsPlayerInRangeOfPoint(j, 10.0, jx, jy, jz))
{
SendClientMessage(j, COLOR_RED, tmp);
}
}
return 1;
}
|
Usa esse aqui, eu uso ele no meu GM, apenas faзa as alteraзхes necessбrias: pawn Code: //OnPlayerCommandTextif(!strcmp(cmd, "/f", true)) { new tmp[128]; strmid(tmp, cmdtext, 3, strlen(cmdtext), 12 ; if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_RED, "/f [texto]"); new Float:jx, Float:jy, Float:jz; strins(tmp, " (Chat-Prуximo):", 0, 12 ; strins(tmp, PlayerName(playerid), 0, 12 ; GetPlayerPos(playerid, jx, jy, jz); for(new j; j < MAX_PLAYERS; j++) { if(IsPlayerInRangeOfPoint(j, 10.0, jx, jy, jz)) { SendClientMessage(j, COLOR_RED, tmp); }}return 1;} |
|
Esse nгo funciona em meu gm,fala que o comando nao existe e renicia o meu gm, porque?
|