Poruke na T vidljive svima koji nisu u blizini

23. Apr. 2012. Zaključano
525
pregleda
5
postova
SeYziicH
4
Made Man
23. Apr. 2012.
Skripta koju koristim: Moj mod
Detaljan opis problema: Kada netko nesto napise na T svi na serveru to vide :S
Dio skripte:

forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
if(!BigEar)
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}//not connected
return 1;
}


forward ProxDetectorS(Float:radi, playerid, targetid);
public ProxDetectorS(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
GetPlayerPos(targetid, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
aleluja
5
Godfather
23. Apr. 2012.
new realchat = 1;

i onplayertexr

if(realchat)
{
format(chat, sizeof(chat), "%s kaže: %s", PlayerName, text);
HPROX(playerid,chat,BIJELA,20.0);
return 0;
}

ovaj hprox napravi kako ti hoćeš....
dock
5
Crime Lord
23. Apr. 2012.
za razliku od bilo koje komande koju zavrsavas sa

return 1;


OnPlayerText moras zavrsiti sa

return 0;


jer return 1; znaci da je tacno i onda ispisuje svima u chatu, dok return 0; znaci netacno i onda zaustavlja poruku odnosno ne salje je svim igracima.. 🙂
SeYziicH
4
Made Man
24. Apr. 2012.
Neradi mi ni dalje jel ima nesto poput proxa?

A i treba mi define za HPROX :S
Luis
5
Godfather
24. Apr. 2012.
public OnPlayerText(playerid, text[])
{
new string ;
format(string, sizeof(string), "%s kaze:%s", GetName(playerid), text);
ProxDetector(30.0, playerid, string, -1,-1,-1,-1,-1);
return true;
}

i stavi taj Prox sta si stavio takoder promijeni GetName kako je kod tebe ..

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha