GL property REP+
#1

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
Reply
#2

Add an if which prevents that situation, nothing simpler. Use this https://sampwiki.blast.hk/wiki/GetPlayerInterior
Reply
#3

What do you mean with this?
Reply
#4

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.
Reply
#5

I'll try that and Update when i tested.
Reply
#6

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?
Reply
#7

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;
}
Reply
#8

when i put that code it shows error 001: expected token: "(", but found "public" and error 001: expected token: ";", but found "-identifier-"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)