[Tutorial] Making a /me /do /shout /b command
#5

Yo, didn't read through exactly everything and sorry for that. One thing that you should add in your proxdetector is to check if the player sending the string is in the same virtual world as the player near them:
Code:
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))
        {
            SendClientMessage(i,color,string);
        }
    }
}
to

Code:
stock ProxDetector(Float:radio, 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)) && ((GetPlayerVirtualWorld(playerid)) == (GetPlayerVirtualWorld(i)))
        {
            SendClientMessage(i,color,string);
        }
    }
}
Why? Because people like me use different virtual worlds for different for instance bank interiors for role-play servers. Then I don't want someone in bank B see something that was written in bank A.
Reply


Messages In This Thread
Making a /me /do /shout /b command - by Blademaster680 - 16.10.2013, 09:13
Re: Making a /me /do /shout /b command - by DemME - 21.12.2013, 00:09
Re: Making a /me /do /shout /b command - by Blademaster680 - 22.12.2013, 17:12
Re: Making a /me /do /shout /b command - by Emmet_ - 22.12.2013, 18:44
Re: Making a /me /do /shout /b command - by Hansrutger - 22.12.2013, 18:57
Re : Making a /me /do /shout /b command - by anou1 - 16.01.2014, 21:15
Re: Re : Making a /me /do /shout /b command - by Blademaster680 - 17.01.2014, 05:43
Re: Making a /me /do /shout /b command - by Guest4390857394857 - 23.02.2014, 10:38
Re: Making a /me /do /shout /b command - by NL-Sultan - 23.02.2014, 14:09
Re: Making a /me /do /shout /b command - by Blademaster680 - 25.02.2014, 07:10
Re: Making a /me /do /shout /b command - by Crayder - 26.02.2014, 02:56
Re: Making a /me /do /shout /b command - by Blademaster680 - 11.03.2014, 10:49
Re: Making a /me /do /shout /b command - by JacobEdwards - 11.03.2014, 20:37
Re: Making a /me /do /shout /b command - by Blademaster680 - 12.03.2014, 17:25
Re: Making a /me /do /shout /b command - by Simou - 14.03.2014, 12:50
Re: Making a /me /do /shout /b command - by IcanBreakCuffs - 06.05.2014, 17:33
Re: Making a /me /do /shout /b command - by Blademaster680 - 07.05.2014, 20:18
Re: Making a /me /do /shout /b command - by IcanBreakCuffs - 07.05.2014, 21:05
Re: Making a /me /do /shout /b command - by Andreas1331 - 16.05.2014, 19:58
Re: Making a /me /do /shout /b command - by Blademaster680 - 24.05.2014, 07:46
Re: Making a /me /do /shout /b command - by Object - 30.05.2014, 21:45
Re: Making a /me /do /shout /b command - by ZcvDev - 29.01.2015, 11:09
Re: Making a /me /do /shout /b command - by Blademaster680 - 30.01.2015, 23:09
Re: Making a /me /do /shout /b command - by ZcvDev - 31.01.2015, 12:51

Forum Jump:


Users browsing this thread: 5 Guest(s)