ingame languages
#1

is it possible to make this:

Aliens talk with humans. But other aliens can see what alien is saying right

Alien: Hello human
but human will see:
Alien: ALfmc sdlkug
Reply
#2

pawn Код:
#include <a_samp>

#define COLOR_WHITE 0xFFFFFFAA

new IsHuman[MAX_PLAYERS];
new IsAlien[MAX_PLAYERS];

new string[128];

public OnPlayerText(playerid, text[])
{
  new sendername[MAX_PLAYER_NAME];
  GetPlayerName(playerid, sendername, sizeof(sendername));
    if(IsHuman[playerid] == 1)
    {
    format(string, sizeof(string), "%s says: %s",sendername,text);
        SendClientMessage(playerid, COLOR_WHITE, string);
        print(text);
    }
    else if(IsHuman[playerid] != 1)
    {
      format(string, sizeof(string), "%s says: -Unknown Language-",sendername);
        SendClientMessage(playerid, COLOR_WHITE, string);
        print(text);
    }
    if(IsAlien[playerid] == 1)
    {
    format(string, sizeof(string), "%s says: %s",sendername,text);
        SendClientMessage(playerid, COLOR_WHITE, string);
        print(text);
    }
    else if(IsAlien[playerid] != 1)
    {
      format(string, sizeof(string), "%s says: -Unknown Language-",sendername);
        SendClientMessage(playerid, COLOR_WHITE, string);
        print(text);
    }
    return 1;
}
change IsHuman / IsAlien to yours e.g IsPlayerHuman or something and if a human talks to an alien it will say -Unknown Language- same to Aliens and humans.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)