[PEDIDO] Mensagem para todos do servidor
#1

Olб pessoal. Eu nгo achei o que eu queria... Gostaria que quando o player matasse 5 ou 10 players mostrasse uma mensagem: Fulano matou 5 players! Corra atrбs dele!. E tambйm: Fulano matou 10 players! Corra atrбs dele!. Essa mensagem seria para o servidor todo.

Obrigado.
Reply
#2

pawn Код:
new recompensa[MAX_PLAYERS];
pawn Код:
//public OnPlayerDeath(playerid, killerid, reason)

         new string[75];
    if(recompensa[killerid]  == 5){
    format(string, sizeof(string), "%s Matou 5, Muito Bom !!", PlayerName(killerid));
    SendClientMessageToAll(0xb9eec0AA, string);
    GivePlayerMoney(killerid, 1050);
    SendClientMessage(killerid, 0xd6deacAA,"* Parabйns! Vocк ganhou 1050 R$ por matar 5 Pessoas!");}

    else if(recompensa[killerid] == 10){
    format(string, sizeof(string), "%s Estб Muito Bom! Jб Matou 10 Pessoas !", PlayerName(killerid));
    SendClientMessageToAll(0xb9eec0AA, string);
    GivePlayerMoney(killerid, 3000);
    SendClientMessage(killerid,0xd6deacAA,"* Parabйns! Vocк ganhou 3000 R$ por matar 10 Pessoas!");}
Reply
#3

pawn Код:
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(1304) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\Luciano\Desktop\Gaming of Life - Gang War\gamemodes\glgw.pwn(1311) : error 017: undefined symbol "PlayerName"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Reply
#4

pawn Код:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(killerid,PlayerName,sizeof(PlayerName));
Acima do Cуdigo
Reply
#5

pawn Код:
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(killerid,PlayerName,sizeof(PlayerName));
ou coloque no final do gamemode(se colocar, nгo precisa colocar o que estб acima na funзгo):
pawn Код:
stock PlayerName(playerid)
{
   new J[22];
   GetPlayerName(playerid, J, sizeof(J));
   return J;
}
Reply
#6

pawn Код:
// Final
stock PlayerName(playerid)
{
GetPlayerName(playerid, Name, sizeof(Name));
return Name;
}
Reply
#7

http://forum.sa-mp.com/showpost.php?...&postcount=411


Abs.
Reply
#8

Resolvido
Reply
#9

jб reparei o cуdigo para funcionar perfeitamente.


http://forum.sa-mp.com/showpost.php?...&postcount=411
Reply
#10

Valeu Garfield, mas jб peguei o do Drakins. Se nгo funcionar eu pego o seu.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)