Encrypting text
#1

I'm bored because i spent alot of time searching for this and i couldn't find.

I knew how to encrypt text for just one team could understand what they are saying and the others not, but now i can't remember. Like i said i tried to search but i couldn't find anything.

If you don't understand what i mean, here is an example:

Team 1 says: LOl team 2 sucks!
Team 1 see: LOl team 2 sucks!

Team 2 see: UHAH SUUHA SH UASUH

Thanks in advance.
Reply
#2

Bump.
Reply
#3

Try to not send these msgs to team 2?
Reply
#4

Quote:
Originally Posted by ¤Adas¤
Try to not send these msgs to team 2?
xD.

But i want this for a zombie mode. Where you can see zombie chatting but you cant understand.
Reply
#5

We can understand do exactly what he said
Reply
#6

He wants to "encrypt" text. Basically changing characters to random ones, so nobody can understand that message.
Reply
#7

You can't use 'sizeof(text)' because text length isn't static.
Reply
#8

Quote:
Originally Posted by Steven82
We can understand do exactly what he said
Would you stop spamming every possible topic in this section. If you have no idea how to script or even help people, then don't post.



pawn Код:
public OnPlayerText(playerid, text[])
{
    new str[128];
    strcat(str, text, , 128);
    for (new i = 0, j = strlen(text); i < j; i++) str[i]++;

    for (new i = 0, j = GetMaxPlayers(), i < j; i++)
    {
        if (i == playerid) continue;
        if (gTeam[i] == TEAM_ZOMBIE) SendPlayerMessageToPlayer(i, playerid, str);
        else SendPlayerMessageToPlayer(i, playerid, text);
    }
    return 0;
}
Reply
#9

I can't believe that this is working! Thank you all and specially to dice7!

[ĦŁ₣]ЉǾǖŦĦЗŁΛẄ thank you for opening my mind!
Reply
#10

Код:
gTeam[i]
C'mon people we aren't in 05,06,07,08,09 anymore. There is working GetPlayerTeam native since 0.3a.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)