2 Roleplay features
#1

Hello guys. I need help with my 2 roleplay features. I want when any player talks, it won't be said in the Global chat, but in an IC chat (Not everyone can see it, only the people who are near them). And maybe a /o command (When people type /o <text>, everyone will see it).

Would be very nice when someone could make this for me!

Greetings, CrazyManiac.
Reply
#2

Bumpi.
Reply
#3

pawn Код:
SendClientMessageToAll(color,message);
stock ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5) {
    new Float:P[3], Float:OP[3], Float:TP[3];
    GetPlayerPos(playerid, OP[0], OP[1], OP[2]);
    for(new i; i < MAX_PLAYERS; i++) {
        GetPlayerPos(i, P[0], P[1], P[2]);
        TP[0] = (OP[0]-P[0]);
        TP[1] = (OP[1]-P[1]);
        TP[2] = (OP[2]-P[2]);
        if(((TP[0] < radi/16) && (TP[0] > -radi/16)) && ((TP[1] < radi/16) && (TP[1] > -radi/16)) && ((TP[2] < radi/16) && (TP[2] > -radi/16))) SendClientMessage(i, col1, str);
        else if (((TP[0] < radi/8) && (TP[0] > -radi/8)) && ((TP[1] < radi/8) && (TP[1] > -radi/8)) && ((TP[2] < radi/8) && (TP[2] > -radi/8))) SendClientMessage(i, col2, str);
        else if (((TP[0] < radi/4) && (TP[0] > -radi/4)) && ((TP[1] < radi/4) && (TP[1] > -radi/4)) && ((TP[2] < radi/4) && (TP[2] > -radi/4))) SendClientMessage(i, col3, str);
        else if (((TP[0] < radi/2) && (TP[0] > -radi/2)) && ((TP[1] < radi/2) && (TP[1] > -radi/2)) && ((TP[2] < radi/2) && (TP[2] > -radi/2))) SendClientMessage(i, col4, str);
        else if (((TP[0] < radi) && (TP[0] > -radi)) && ((TP[1] < radi) && (TP[1] > -radi)) && ((TP[2] < radi) && (TP[2] > -radi))) SendClientMessage(i, col5, str);
    }
    return 1;
}
Reply
#4

Where do i have to post this? Under my command ''/o''?
Reply
#5

/o
SendClientMessageToAll


Local chat, use ProxDetector.
Reply
#6

Код:
C:\Documents and Settings\Tessa Krijnen\Mijn documenten\Fabians Fun Server (0.3e)\gamemodes\v3.9.pwn(1967) : warning 225: unreachable code
C:\Documents and Settings\Tessa Krijnen\Mijn documenten\Fabians Fun Server (0.3e)\gamemodes\v3.9.pwn(2163 -- 2164) : error 017: undefined symbol "color"
C:\Documents and Settings\Tessa Krijnen\Mijn documenten\Fabians Fun Server (0.3e)\gamemodes\v3.9.pwn(2163 -- 2164) : error 001: expected token: ")", but found ";"
C:\Documents and Settings\Tessa Krijnen\Mijn documenten\Fabians Fun Server (0.3e)\gamemodes\v3.9.pwn(2165) : error 001: expected token: ";", but found "stock"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#7

Guessing the lines am i?
Reply
#8

What do you mean? I just need help with it >_>
Reply
#9

I really need help with this, i dont really get it >_<

Btw, i guess tyler helped me with the /o command, but does anybody
Knows how to make it like when people talk without using any command, only
people can see it that are near them?
Reply
#10

pawn Код:
public OnPlayerText(playerid, text[])
{
    new
        message[128];
    format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
    ProxDetector(30.0, playerid, message, col1,col2,col3,col4,col5);
    return 0;
}
Something like that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)