[Ajuda] ATIRAR NUM PLAYER
#1

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.
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
Reply
#3

Como usa este Codigo : /
Reply
#4

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    if(
issuerid != INVALID_PLAYER_ID// If not self-inflicted
    
{
        new
            
infoString[128],
            
weaponName[24],
            
victimName[MAX_PLAYER_NAME],
            
attackerName[MAX_PLAYER_NAME];
 
        
GetPlayerName(playeridvictimNamesizeof (victimName));
        
GetPlayerName(issueridattackerNamesizeof (attackerName));
 
        
GetWeaponName(weaponidweaponNamesizeof (weaponName));
 
        
format(infoStringsizeof(infoString), "%s has made %.0f damage to %s, weapon: %s"attackerNameamountvictimNameweaponName);
        
SendClientMessageToAll(-1infoString);
    }
    return 
1;

by : WIKI
Reply
#5

viw os 2


Edit:

Para que serve este codigo aqui??

PHP Code:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponid)
{
    if(
issuerid != INVALID_PLAYER_ID && weaponid == 34)
    {
        
// One shot to kill with sniper rifle
        
SetPlayerHealth(playerid0.0);
    }
    return 
1;

Reply
#6

Quando o cara der um tiro no outro jogador com a sniper irб ser ONE SHOT KILL (1 tiro = morte .
Reply
#7

Atб tendi, agora tenho um poblema й tirar o SendClientMessageToAll e colocar SendClientMessage para os dois player
Reply
#8

pawn Code:
SendClientMessage(playerid, 0xFF0000FF, "Perdeu vacilгo, levou um tiro de Sniper");
SendClientMessage(issuerid, 0x00FF00FF, "Boa mano, acertou uma Snipada na cara dele.");
Reply
#9

Onde ponha os dano e nome do player e id da arma. essis daqui : attackerName, amount, victimName, weaponName
Reply
#10

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);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)