[Ajuda] ATIRAR NUM PLAYER - 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] ATIRAR NUM PLAYER (
/showthread.php?tid=458928)
ATIRAR NUM PLAYER -
powerths - 19.08.2013
Alguem sabe comando quando um player atira no otro ai fala a sim Ex: Player Zezinho Atirou em vocк com uma AK-47 e dechou com 70 de vida.
Re: ATIRAR NUM PLAYER -
GM_KoDi - 19.08.2013
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
Re: ATIRAR NUM PLAYER -
powerths - 19.08.2013
Como usa este Codigo : /
Re: ATIRAR NUM PLAYER -
darkxdll - 19.08.2013
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID) // If not self-inflicted
{
new
infoString[128],
weaponName[24],
victimName[MAX_PLAYER_NAME],
attackerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, victimName, sizeof (victimName));
GetPlayerName(issuerid, attackerName, sizeof (attackerName));
GetWeaponName(weaponid, weaponName, sizeof (weaponName));
format(infoString, sizeof(infoString), "%s has made %.0f damage to %s, weapon: %s", attackerName, amount, victimName, weaponName);
SendClientMessageToAll(-1, infoString);
}
return 1;
}
by : WIKI
Re: ATIRAR NUM PLAYER -
powerths - 19.08.2013
viw os 2
Edit:
Para que serve este codigo aqui??
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID && weaponid == 34)
{
// One shot to kill with sniper rifle
SetPlayerHealth(playerid, 0.0);
}
return 1;
}
Re: ATIRAR NUM PLAYER -
darkxdll - 19.08.2013
Quando o cara der um tiro no outro jogador com a sniper irб ser ONE SHOT KILL (1 tiro = morte
.
Re: ATIRAR NUM PLAYER -
powerths - 19.08.2013
Atб tendi, agora tenho um poblema й tirar o
SendClientMessageToAll e colocar
SendClientMessage para os dois player
Re: ATIRAR NUM PLAYER -
Juniiro3 - 19.08.2013
pawn Code:
SendClientMessage(playerid, 0xFF0000FF, "Perdeu vacilгo, levou um tiro de Sniper");
SendClientMessage(issuerid, 0x00FF00FF, "Boa mano, acertou uma Snipada na cara dele.");
Re: ATIRAR NUM PLAYER -
powerths - 19.08.2013
Onde ponha os dano e nome do player e id da arma. essis daqui :
attackerName, amount, victimName, weaponName
Re: ATIRAR NUM PLAYER -
Juniiro3 - 19.08.2013
pawn Code:
format(infoString, sizeof(infoString), "%s has made %.0f damage to %s, weapon: %s", attackerName, amount, victimName, weaponName);
Traduzindo:
pawn Code:
format(infoString, sizeof(infoString), "%s causou %.0f de dano para %s, arma: %s", attackerName, amount, victimName, weaponName);