SA-MP Forums Archive
[Pedido] Chat kill (no chat onde conversa) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Chat kill (no chat onde conversa) (/showthread.php?tid=476416)



Chat kill (no chat onde conversa) - luccagomes15 - 18.11.2013

Eu queria um chat kill diferente dos outros que aparece na tela pra todos verem, queria um que sу aparece-se no chat onde conversa pra quem matou e pra quem morreu... Tipo: Joгo_Pedro matou Lucas_Soares de desert eagle
Entгo pro joгo e pro lucas aparece-se essa msg no chat: Joao_Pedro foi morto por Lucas_Soares (por arma 24)
Ou se nгo der sem a arma jб seria uma boa ajuda!


Re: Chat kill (no chat onde conversa) - Caio_loco - 18.11.2013

Atй da para criar,ainda sou novato no pawno,mas jб vi varios servers de DM/Stunt com esse sistema!

Boa Sorte!


Re: Chat kill (no chat onde conversa) - DannielCooper - 18.11.2013

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new killername[MAX_PLAYER_NAME], mortonome[MAX_PLAYER_NAME], armanome;

GetWeaponName(killerid, armanome, sizeof (armanome));

SendClientMessageToAll(playerid, /* COR */, "%s foi morto por %s, com a arma %s", killername, mortoname, armanome);
sу gostaria de saber como alguйm que mexe nisso б mais de 1 mes e nгo sabe fazer issu ..


Re: Chat kill (no chat onde conversa) - luccagomes15 - 18.11.2013

Quote:
Originally Posted by DannielCooper
Посмотреть сообщение
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new killername[MAX_PLAYER_NAME], mortonome[MAX_PLAYER_NAME], armanome;

GetWeaponName(killerid, armanome, sizeof (armanome));

SendClientMessageToAll(playerid, /* COR */, "%s foi morto por %s, com a arma %s", killername, mortoname, armanome);
sу gostaria de saber como alguйm que mexe nisso б mais de 1 mes e nгo sabe fazer issu ..
Deu erros

D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17240) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17240) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17241) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17239) : warning 203: symbol is never used: "armanome"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17239) : warning 204: symbol is assigned a value that is never used: "mortonome"


E se funciona-se ia mandar a msg pra todos online eu queria q a msg sу aparece-se sу pro cara que matou e pro cara que morreu!


Re: Chat kill (no chat onde conversa) - Tugamars - 18.11.2013

Acho que tem que usar GetPlayerName e verificar se ele foi quem matou ou quem morreu ... e botar uma SendClientMessage no caso de ser


Re: Chat kill (no chat onde conversa) - luccagomes15 - 19.11.2013

Quote:
Originally Posted by Tugamars
Посмотреть сообщение
Acho que tem que usar GetPlayerName e verificar se ele foi quem matou ou quem morreu ... e botar uma SendClientMessage no caso de ser
Pode me dar uma base? Algum exemplo? Sou iniciante..


Respuesta: Re: Chat kill (no chat onde conversa) - DanDRT - 19.11.2013

Quote:
Originally Posted by Tugamars
Посмотреть сообщение
Acho que tem que usar GetPlayerName e verificar se ele foi quem matou ou quem morreu ... e botar uma SendClientMessage no caso de ser
--' pra que? ._. killerid = Matou e playerid = Morreu.
o erro foi que ele pegou o nome sem usar uma string ele tem que substituir o
pawn Код:
new armaname;
por

pawn Код:
new armaname[32];
Botei 32 pq n lembro qual й o maior numero de caracteres que uma arma possui no nome.


Re: Chat kill (no chat onde conversa) - luccagomes15 - 19.11.2013

D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17240) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17240) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17241) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17239) : warning 203: symbol is never used: "armanome"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(17239) : warning 204: symbol is assigned a value that is never used: "mortonome"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(1723 : warning 204: symbol is assigned a value that is never used: "armaname"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

new armaname[32]; (1723
new killername[MAX_PLAYER_NAME], mortonome[MAX_PLAYER_NAME], armanome; (17239)
GetWeaponName(killerid, armanome, sizeof (armanome)); (17240)
SendClientMessageToAll(playerid, COLOR_WHITE, "%s foi morto por %s, com a arma %s", killername, mortoname, armanome); (17241)


Re: Chat kill (no chat onde conversa) - DannielCooper - 19.11.2013

Quote:
Originally Posted by Tugamars
Посмотреть сообщение
Acho que tem que usar GetPlayerName e verificar se ele foi quem matou ou quem morreu ... e botar uma SendClientMessage no caso de ser
Vou nem zuar, vai que й duenзa..

#Topic .

Troque

pawn Код:
SendClientMessageToAll(playerid, COLOR_WHITE, "%s foi morto por %s, com a arma %s", killername, mortoname, armanome);
por:

pawn Код:
format(armanome,sizeof(armanome), "%s foi morto por %s, com a arma %s", killername, mortoname, armanome);
SendClientMessageToAll(armanome), sizeof(armanome), /* COR */);



Re: Chat kill (no chat onde conversa) - luccagomes15 - 19.11.2013

Desculpa a ignorancia, mas aqui n ta pegando! Ta dando erro, deve ser pq sou noob mesmo, te dei rep, mas me ajuda n ta indo!

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

new armaname[32]; // linha 17239
new killername[MAX_PLAYER_NAME], mortonome[MAX_PLAYER_NAME], armanome; // linha 17240
GetWeaponName(killerid, armanome, sizeof (armanome)); // linha 17241
format(armanome,sizeof(armanome), "%s foi morto por %s, com a arma %s", killername, mortoname, armanome); // linha 17242
SendClientMessageToAll(armanome), sizeof(armanome), COLOR_WHITE); // linha 17243

//===================================================================

    if(PlayerInfo[playerid][pVIP] < 1 && SistemaHospital == 1 && helpertrampando[playerid] < 1 && admtrampando[playerid] < 1)
    {
........... etc
Erros
pawn Код:
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17241) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17241) : error 035: argument type mismatch (argument 2)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17242) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17242) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17243) : warning 202: number of arguments does not match definition
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17243) : warning 215: expression has no effect
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17243) : warning 215: expression has no effect
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17243) : error 001: expected token: ";", but found ")"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17243) : error 029: invalid expression, assumed zero
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17243) : warning 215: expression has no effect
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17240) : warning 204: symbol is assigned a value that is never used: "mortonome"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(17239) : warning 204: symbol is assigned a value that is never used: "armaname"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.