Local Chat Problem.
#1

Hello Everyone,

I have a problem in my server. If someone is in LS and other is in LV, they can talk to each other and hear each other. And I have Lanmode off.
Код:
lanmode 0
And I want to know to fix this problem. And my gamemode isn't made from SCRATCH, it is edited since i am PAWNO BEGINNER. I just want to know what to search for in my Gamemode to edit it and make it only people with specific range hear that. For example 15meter. Please Help
Reply
#2

lanmode has nothing to do with how your script works, show your OnPlayerText or whatever command you use for sending messages(chat)
Reply
#3

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
lanmode has nothing to do with how your script works, show your OnPlayerText or whatever command you use for sending messages(chat)
I have this :
pawn Код:
public OnPlayerText(playerid, text[])
{
    new giver[MAX_PLAYER_NAME];
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new tmp[256];
    new string[256];
    new giveplayerid;
    if(ReactionState == R_STATE_ACTIVE)
    {
        if(!strcmp(text, ReactionString, false))
        {
            ReactionState = R_STATE_NOT_ACTIVE;
            GetPlayerName(playerid,giveplayer,MAX_PLAYER_NAME);
            format(string,sizeof(string),"{FFAF00}Fast Event Bot: {F3FF02}%s {FFFFFF}has won the fast event and recieved {F3FF02}%d$ {FFFFFF}!",giveplayer,ReactionCash);
            SendClientMessageToAll(-1,string);
            GivePlayerMoney(playerid,ReactionCash);
            ReactionCash = 0;
        }
Is this the correct one ?
Reply
#4

what command do you use for local chat?
Reply
#5

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
what command do you use for local chat?
You mean (/o)oc ? or (/b) ?
(/o)oc CMD :
pawn Код:
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet");
                return 1;
            }
            if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, "The OOC channel has been disabled by an Admin");
                return 1;
            }
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "You can't speak, you have been silenced");
                return 1;
            }
            new result[64];
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && ((cmdtext[idx] <= ' ')))
            {
                idx++;
            }
            new offset = idx;
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GREY, "USAGE: (/o)oc [ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "(( %s: %s ))", sendername, result);
            OOCOff(COLOR_OOC,string);
            printf("%s", string);
        }
        return 1;
    }
(/b) Command :
pawn Код:
if(strcmp(cmd, "/b", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pMuted] == 1)
            {
                SendClientMessage(playerid, TEAM_CYAN_COLOR, "You cannot speak, you have been silenced");
                return 1;
            }
            if(gPlayerLogged[playerid] == 0)
            {
                SendClientMessage(playerid, COLOR_WHITE, "You havent logged in yet");
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
            {
                idx++;
            }
            new offset = idx;
            new result[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GREY, "USAGE: /b [local ooc chat]");
                return 1;
            }
            format(string, sizeof(string), "%s Says: (( %s ))", sendername, result);
            ProxDetector(20.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
            printf("%s", string);
        }
        return 1;
    }
Reply
#6

Oh god, you should really start using ZCMD or any other command processor(preferred ZCMD).

Mind explaining your problem a little bit more? As far as your code goes... i dont see anything wrong(i could be wrong)
Reply
#7

Stop using NGRP edits if you don't know how to script

Send me a screenshot of your Server Info when viewed on the SAMP Client. I have a feeling the gamemode didn't compile properly and therefore have a base script.

Like this:
Reply
#8

Quote:
Originally Posted by xSmilE
Посмотреть сообщение
Stop using NGRP edits if you don't know how to script

Send me a screenshot of your Server Info when viewed on the SAMP Client. I have a feeling the gamemode didn't compile properly and therefore have a base script.

Like this:
This isn't NG-RP Edit, it is a romanian RPG gamemode. I edited it. And it have nothing with NG-RP.
Reply
#9

Quote:
Originally Posted by EgyptForLife
Посмотреть сообщение
This is NG-RP Edit
Quote:
Originally Posted by EgyptForLife
Посмотреть сообщение
it have nothing with NG-RP.
I'm afraid it does, my friend... well according to you anyway^
Reply
#10

Quote:
Originally Posted by xSmilE
Посмотреть сообщение
I'm afraid it does, my friend... well according to you anyway^
I didn't say that, what i said is that it have nothing with NG-RP Edit and i never edited that gm.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)