help me
#1

How do i set this?

This to:

If im on BigEar any player type i can hear. even if im far to him.

Код:
Code:
    switch(PlayerInfo[playerid][pAccent])
    {
        case 0, 1:
        {
            if(AdminDuty[playerid] == 1)
            {
                format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
            }
            else
            {
                format(string, sizeof(string), "%s says: %s", sendername, text);
            }
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
Some BigEar variables
Code:
Код:
new BigEar[MAX_PLAYERS];
Thank you very much!
Reply
#2

U want to hear? Or want to see?
Reply
#3

Quote:
Originally Posted by Hanuman
Посмотреть сообщение
U want to hear? Or want to see?
iF MY BigEar is ON /bigear

I can hear what his/her saying even if he is far
Reply
#4

By my knowledge, u cannot hear what he is saying, U can only see on his head what he has written [Or possibly i couldn't got u what are u saying]
Reply
#5

Quote:
Originally Posted by Hanuman
Посмотреть сообщение
By my knowledge, u cannot hear what he is saying, U can only see on his head what he has written [Or possibly i couldn't got u what are u saying]
What?

I think its like SendClientMessageToAll

But only work for an player who Toggle their BigEar
Reply
#6

Then lol, say that u want to see what he has written on the screen.

U want this? if player is on adminduty and he has done BigEar[playerid] = 1, then he can see whatever other players write
OR
U want this? if player is on adminduty and he is standing at BigEar, then he can see whatever other players write
Reply
#7

This is the stock to know, if player is standing at bigear or not.
Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 1;
    }

    return 0;
}
Your codes.
Код:
switch(PlayerInfo[playerid][pAccent])
    {
        case 0, 1:
        {
            if(AdminDuty[playerid] == 1)
            {
                format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
            }
            else
            {
               for(new i=0; i<MAX_PLAYERS; i++)
               {
                   if(AdminDuty[i] == 1)
                  {
                       if(IsPlayerInArea(i, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY))//add minx, miny, maxx and maxy
                       {
                             format(string, sizeof(string), "%s says: %s", sendername, text);
                             SendClientMessage(i, your_color, string);
                       }
                  }
               }
            }
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
Reply
#8

Quote:
Originally Posted by Hanuman
Посмотреть сообщение
This is the stock to know, if player is standing at bigear or not.
Код:
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 1;
    }

    return 0;
}
Your codes.
Код:
switch(PlayerInfo[playerid][pAccent])
    {
        case 0, 1:
        {
            if(AdminDuty[playerid] == 1)
            {
                format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
            }
            else
            {
               for(new i=0; i<MAX_PLAYERS; i++)
               {
                   if(AdminDuty[i] == 1)
                  {
                       if(IsPlayerInArea(i, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY))//add minx, miny, maxx and maxy
                       {
                             format(string, sizeof(string), "%s says: %s", sendername, text);
                             SendClientMessage(i, your_color, string);
                       }
                  }
               }
            }
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
not like that

I mean


For example: I Toggle my BigEar then now i can hear what player saying on chat even if he is far to me or not
Reply
#9

Код:
switch(PlayerInfo[playerid][pAccent])
    {
        case 0, 1:
        {
            if(AdminDuty[playerid] == 1)
            {
                format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
            }
            else
            {
               for(new i=0; i<MAX_PLAYERS; i++)
               {
                   if(AdminDuty[i] == 1)
                  {
                       if(BigEar[i]==1)
                       {
                             format(string, sizeof(string), "%s says: %s", sendername, text);
                             SendClientMessage(i, your_color, string);
                       }
                  }
               }
            }
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
Solved?
Reply
#10

Quote:
Originally Posted by Hanuman
Посмотреть сообщение
Код:
switch(PlayerInfo[playerid][pAccent])
    {
        case 0, 1:
        {
            if(AdminDuty[playerid] == 1)
            {
                format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
            }
            else
            {
               for(new i=0; i<MAX_PLAYERS; i++)
               {
                   if(AdminDuty[i] == 1)
                  {
                       if(BigEar[i]==1)
                       {
                             format(string, sizeof(string), "%s says: %s", sendername, text);
                             SendClientMessage(i, your_color, string);
                       }
                  }
               }
            }
            ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
            SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
        }
Solved?
Yes!!! Thank you very much for this but

You need to change something..

If a player is On AdminDuty then i toggle my BigEar. then he send a message i can still hear even if he is far to me..

Same if the player is not on AdminDuty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)