Help . :D
#1

How make, when you write something in chat, nobody can't see. They can see if that player, are next to you? Like in a Roleplay Server.

+Rep, ofcourse.
Reply
#2

"Like a Roleplay Server" so why didn't you just find yourself a roleplay script and copy that code from it?

I'm sure this was already answered a million times... Even a tutorial exists for such a thing. You can find it here
Reply
#3

It's a stock which goes by the name 'ProxDetector'. ****** it and you'll find more than what you needed.
Reply
#4

pawn Код:
ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5)
{
    new Float:pPositionX[3], Float:oPositionX[3];
    GetPlayerPos(playerid, pPositionX[0], pPositionX[1], pPositionX[2]);
    foreach(Player, i)
    {
        GetPlayerPos(i, oPositionX[0], oPositionX[1], oPositionX[2]);
        if(IsPlayerInRangeOfPoint(i, radi / 16, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col1, string); }
        else if(IsPlayerInRangeOfPoint(i, radi / 8, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col2, string); }
        else if(IsPlayerInRangeOfPoint(i, radi / 4, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col3, string); }
        else if(IsPlayerInRangeOfPoint(i, radi / 2, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col4, string); }
        else if(IsPlayerInRangeOfPoint(i, radi, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col5, string); }
    }
    return 1;
}
pawn Код:
C:\Users\USER\Desktop\Programe\TestServer\pawno\include\sscanf.inc(171) : error 017: undefined symbol "foreach"
C:\Users\USER\Desktop\Programe\TestServer\pawno\include\sscanf.inc(173) : error 017: undefined symbol "playerid"
C:\Users\USER\Desktop\Programe\TestServer\pawno\include\sscanf.inc(176) : error 017: undefined symbol "playerid"
C:\Users\USER\Desktop\LS-VR Tradus Romana\filterscripts\AdminSystem.pwn(2046) : warning 203: symbol is never used: "ProxDetector"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Ignore foreach.
Reply
#5

pawn Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
        {
            MSG(i,color,string);
        }
    }
}
Give this one a go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)