SA-MP Forums Archive
[Ajuda] Ajuda comando - 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: [Ajuda] Ajuda comando (/showthread.php?tid=435642)



Ajuda comando - LKING - 07.05.2013

Tipo quando alguem mata uma pessoa aparecer que o player tal matou outro player


Re: Ajuda comando - Miqueias Barros - 07.05.2013

pawn Код:
public OnPlayerDeath(playerid, killerid, reason) {
    SendDeathMessage(killerid, playerid, reason);
    return true;
}



Respuesta: Ajuda comando - Plini0M4theus - 07.05.2013

Explique-se melhor oque vocк que dizer com isso,quer uma comando de quem matou quem ou quer retira-lo ?


Re: Ajuda comando - BielCOP - 07.05.2013

pawn Код:
new Fala[64];
new Nome[24];
new Nome2[24];

GetPlayerName(killerid,Nome,sizeof(Nome));
GetPlayerName(playerid,Nome2,sizeof(Nome2));
format(Fala,sizeof(Fala),"Player %s matou %s",Nome,Nome2);
SendClientMessageToAll(-1,Fala);



Re: Ajuda comando - LKING - 07.05.2013

Quote:
Originally Posted by BielCOP
Посмотреть сообщение
pawn Код:
new Fala[64];
new Nome[24];
new Nome2[24];

GetPlayerName(killerid,Nome,sizeof(Nome));
GetPlayerName(playerid,Nome2,sizeof(Nome2));
format(Fala,sizeof(Fala),"Player %s matou %s",Nome,Nome2);
SendClientMessageToAll(-1,Fala);
Onde ponho isso no comando?
Se for da um erro que e do killerid


Respuesta: Ajuda comando - Plini0M4theus - 07.05.2013

Tente:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
format(gstring, sizeof(gstring), "Voce foi ~r~ morto ~w~por ~g~%s", playerid);
GameTextForPlayer(killerid, gstring, 2000, 3);
return 1;
}



Re: Ajuda comando - BielCOP - 07.05.2013

Coloque no ONPLAYERDEATH


Re: Ajuda comando - LKING - 07.05.2013

C:\Users\HP\Desktop\Gamemodes\gamemodesca\gamemode s\sfdm.pwn(696) : error 021: symbol already defined: "format"
C:\Users\HP\Desktop\Gamemodes\gamemodesca\gamemode s\sfdm.pwn(69 : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


Re: Ajuda comando - LKING - 07.05.2013

C:\Users\HP\Desktop\Gamemodes\gamemodesca\gamemode s\sfdm.pwn(284) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\HP\Desktop\Gamemodes\gamemodesca\gamemode s\sfdm.pwn(471) : warning 219: local variable "Nome" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 1928 bytes
Code size: 91140 bytes
Data size: 26128 bytes
Stack/heap size: 16384 bytes; estimated max. usage=1540 cells (6160 bytes)
Total requirements: 135580 bytes

2 Warnings.


Respuesta: Ajuda comando - Plini0M4theus - 07.05.2013

Nгo й permitido "Double Post" (Postagem dupla) antes de 24 horas. Existe um botгo chamado "Editar" .

Tenta agora:
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	new gstring[64];
	format(gstring, sizeof(gstring), "Voce foi ~r~ morto ~w~por ~g~%s", playerid);
	GameTextForPlayer(killerid, gstring, 2000, 3);
	return 1;
}