[Ajuda] Mensagem quando mata.
#1

Galera sou noobzinho no pawn ainda, e quero saber como eu faco aparecer uma mensagem no chat, quando um player mata outro fora da favela, por exemplo:

(Anti - DM) %s matou %s e estб sendo procurado pela policia.

Quando o player mata dentro da favela, aparece uma mensagem:

(Favela - DM Liberado) %s matou %s na favela e nгo foi para lista de procurados!

Code da mensagem:
pawn Код:
if(IsPlayerInRangeOfPoint(killerid, 100, 1970.0239,-1198.5100,17.4500))
        {
            new string[128], killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string, sizeof(string), "(Favela - DM Liberado) %s matou %s na favela e nгo foi para lista de procurados!", killer, nome(playerid));
            SendClientMessageToAll(0xCAFF70AA, string);
        }

Agora eu quero um code, pra quando o player matar FORA da favela, aparecer uma mensagem no chat, algum ajuda? Please?
Reply
#2

pawn Код:
if(!IsPlayerInRangeOfPoint(killerid, 100, 1970.0239,-1198.5100,17.4500))
        {
            new string[128], killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string, sizeof(string), "(Favela - DM Liberado) %s matou %s fora da favela", killer, nome(playerid));
            SendClientMessageToAll(0xCAFF70AA, string);
        }
ou...

pawn Код:
if(IsPlayerInRangeOfPoint(killerid, 100, 1970.0239,-1198.5100,17.4500))
        {
            new string[128], killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string, sizeof(string), "(Favela - DM Liberado) %s matou %s na favela", killer, nome(playerid));
            SendClientMessageToAll(0xCAFF70AA, string);
        }
        else
        {
            new string[128], killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string, sizeof(string), "(Favela - DM Liberado) %s matou %s fora da favela", killer, nome(playerid));
            SendClientMessageToAll(0xCAFF70AA, string);
         }



Se der erro me fala.
Reply
#3

pawn Код:
static string[89];

if(IsPlayerInRangeOfPoint(killerid, 100.0, 1970.0239,-1198.5100,17.4500))
        format(string, sizeof(string), "(Favela - DM Liberado) %s matou %s na favela", nome(killerid), nome(playerid));
else
        format(string, sizeof(string), "(Favela - DM Liberado) %s matou %s fora da favela", nome(killerid), nome(playerid))


SendClientMessageToAll(0xCAFF70AA, string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)