GL property REP+ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GL property REP+ (
/showthread.php?tid=432295)
GL property REP+ -
Lynet - 21.04.2013
Hello, I've a problem, i Got proxdetector and it works great but when ppl is inside interiors, then we Can see Their whole chat?
Im using gl_property
AW: GL property REP+ -
HurtLocker - 21.04.2013
Add an if which prevents that situation, nothing simpler. Use this
https://sampwiki.blast.hk/wiki/GetPlayerInterior
Re: GL property REP+ -
Lynet - 21.04.2013
What do you mean with this?
Re: GL property REP+ -
Face9000 - 21.04.2013
Emh, i dont remember how ProxDetector works and i don't understand what is your problem. You mean that when a player is inside an interior he can read the whole chat (of all players) and not the local chat and you wanna disable this?
Then...
pawn Код:
if(GetPlayerInterior(playerid)==INTERIOR_ID)
{
//your proxdetector stuff
}
Otherwise, explain better.
Re: GL property REP+ -
Lynet - 21.04.2013
I'll try that and Update when i tested.
Re: GL property REP+ -
Lynet - 22.04.2013
Still doesnt work, that im meaning is, i'm doing a RP server, but when players is inside interiors, then people outside interiors can see their chat? But they cant see ours?
Any solutions?
Re: GL property REP+ -
lean1337 - 22.04.2013
Had this issue too.
I fixed it by using this proxdetector.
pawn Код:
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);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if(GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
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);
}
}
}
}
}
return 1;
}
Re: GL property REP+ -
JoshP - 21.07.2013
when i put that code it shows error 001: expected token: "(", but found "public" and error 001: expected token: ";", but found "-identifier-"