[Ajuda] ChatKill Samp
#1

Estou Com Problemas Quando Uma Pessoa Mata a Outra Aparece Assim , - Mentos_WizzarD (Caverinha) Lucas_Dias
Mata Certinho Mais Nao Esta Aparecendo As Armas


Public OnPlayerSpawn

PHP код:
public OnPlayerSpawn(playerid)
{
    
SetPlayerTeam(playerid1);
    
SetPVarInt(playerid"mortoPor"INVALID_PLAYER_ID);
    
PlayerTextDrawShow(playeridINFO[0][playerid]);
    
PlayerTextDrawShow(playeridINFO[1][playerid]);
    
PlayerTextDrawShow(playeridINFO[2][playerid]);
    
PlayerTextDrawShow(playeridINFO[3][playerid]);
    
PlayerTextDrawShow(playeridINFO[4][playerid]);
    
PlayerTextDrawShow(playeridINFO[5][playerid]);
    
PlayerTextDrawShow(playeridINFO[6][playerid]);
    
PlayerTextDrawShow(playeridINFO[7][playerid]);
    
PlayerTextDrawShow(playeridINFO[8][playerid]);
    
GivePlayerWeapon(playerid24,999);
    
GivePlayerWeapon(playerid34,999);
    
SetPlayerInterior(playerid,0);
    
spree[playerid] = 0;
////////////////////////////////////////////////////////////////
    
DesapareceTexts(playerid);
    return 
1;

Public OnPlayerDeath

PHP код:

public OnPlayerDeath(playeridkilleridreason)
{
    if (
GetPVarInt(playerid"mortoPor") != INVALID_PLAYER_ID)
    {
    
killerid =  GetPVarInt(playerid"mortoPor");
    }
    
SendDeathMessage(killeridplayeridreason);
    new 
random(5);
    switch(
s)
    {
        case 
0SetPlayerScore(killeridGetPlayerScore(killerid) + 5);
        case 
1SetPlayerScore(killeridGetPlayerScore(killerid) + 10);
        case 
2SetPlayerScore(killeridGetPlayerScore(killerid) + 15);
        case 
3SetPlayerScore(killeridGetPlayerScore(killerid) + 18);
        case 
4SetPlayerScore(killeridGetPlayerScore(killerid) + 20);
    }
    
pInfo[killerid][Matou]++;
    
pInfo[playerid][Morreu]++;
    
spree[killerid] ++;
    switch(
spree[killerid])
    {
        case 
1GameTextForPlayer(killerid,"~y~Mandou Pra Vala!",3000,1);
        case 
2GameTextForPlayer(killerid,"~y~Double Kill",3000,1);
        case 
3GameTextForPlayer(killerid,"~y~Triple Kill",3000,1);
        case 
4GameTextForPlayer(killerid,"~y~Multi Kill",3000,1);
        case 
6GameTextForPlayer(killerid,"~y~Triple Kill x2",3000,1);
        case 
8GameTextForPlayer(killerid,"~y~Multi Kill x2",3000,1);
        case 
10GameTextForPlayer(killerid,"~y~Monster Killer!",3000,1);
        case 
15GameTextForPlayer(killerid,"~y~Holy Shit!",3000,1);
        case 
20GameTextForPlayer(killerid,"~y~Insane Killer!",3000,1);
        case 
30GameTextForPlayer(killerid,"~y~Fuckyea Killer!",3000,1);
        case 
50GameTextForPlayer(killerid,"~y~HARD Killer!",3000,1);
    }
    return 
1;

Public OnGiveDamage

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponidbodypart)
{
        switch(
weaponid)
        {
            case 
24:amount 32.0//Eagle
            
case 25:amount 17.0//Shotgun
            
case 27:amount 15.0//Combat Shotgun
            
case 29:amount 5.0;  //MP5
            
case 30:amount 7.0;  //AK-47
            
case 31:amount 7.0;  //M4
            
case 42:amount 0.0;  //Extintor - Bombeiros
            
case 9:amount 0.0;  //Serra - Bombeiros
            
case 34:amount 100.0;
        }
        
PlayerPlaySound(damagedid17804,  0.00.00.0);
        
PlayerPlaySound(playerid17802,  0.00.00.0);
        new 
Float:LifeFloat:ColeeteFloat:Dano;
        
GetPlayerArmour(damagedidColeete);
        
GetPlayerHealth(damagedidLife);
    if(
Coleete 0)
    {
        if(
amount Coleete)
        {
            
Dano amount Coleete;
            
Life Life Dano;
            if(
Life <= 0)
            {
            
SetPVarInt(damagedid"mortoPor"playerid);
            }
            
SetPlayerArmour(damagedid0.0);
            
SetPlayerHealth(damagedidLife);
        }
        else
        {
          
Coleete Coleete amount;
          
SetPlayerArmour(damagedidColeete);
          }
    }
    else if(
Coleete 1)
    {
        
Life Life amount;
        if(
Life <= 0)
        {
        
SetPVarInt(damagedid"mortoPor"playerid);
        }
        
SetPlayerHealth(damagedidLife);
        }
        return 
1;

Print de Como Fica Quando Mata : http://imgur.com/CtBHvmS
Reply
#2

Tenho um Aqui pra vocк... ativa e desativa.

pawn Код:
new Verck; // topo da GM

// Onplayer Death
if(Verck >= 1)
        {
            SendDeathMessage(killerid, playerid, reason); //chat kill
        }
       
Coloca o comando

    if(strcmp(cmdtext, "/verck", true) == 0 || strcmp(cmdtext, "/verchatkill", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 3000)
        {
            if(Verck == 1)
            {
                Verck = 0;
            }
            else
            {
                Verck = 1;
            }
        }
        return 1;
    }
@Editado kkk tinha esquecido de uma coisa.
Ok
Reply
#3

Ativado e Desativado Sim Quero

@Topico
Alguem pra ajudar resolver esse BUG ;/
Reply
#4

Ok esta ai em cima.

para deixar legal vocк pode deixar isso tb na oplayerdeath

if(reason == 25) // id Arma
{
if(IsPlayerConnected(killerid))
{
format(string,sizeof(string), "o %d Estorou o cu do %s com o Cbug ",killerid,playerid));
ABroadCast(COLOR_YELLOW,string,1);
printf("%s", string);
}
}
Reply
#5

Faz a mesma coisa que voce fez com a variavel pro killerid com reason, seta a reason o id da arma que o player matou
Reply
#6

Ae, testa aн se funcionou.

//Topo Do GM
PHP код:
new Arma[MAX_PLAYERS] = 53
//OnPlayerGiveDamage
PHP код:
public OnPlayerSpawn(playerid

    
SetPlayerTeam(playerid1); 
    
SetPVarInt(playerid"mortoPor"INVALID_PLAYER_ID); 
    
Arma[playerid] = 53;
    
PlayerTextDrawShow(playeridINFO[0][playerid]); 
    
PlayerTextDrawShow(playeridINFO[1][playerid]); 
    
PlayerTextDrawShow(playeridINFO[2][playerid]); 
    
PlayerTextDrawShow(playeridINFO[3][playerid]); 
    
PlayerTextDrawShow(playeridINFO[4][playerid]); 
    
PlayerTextDrawShow(playeridINFO[5][playerid]); 
    
PlayerTextDrawShow(playeridINFO[6][playerid]); 
    
PlayerTextDrawShow(playeridINFO[7][playerid]); 
    
PlayerTextDrawShow(playeridINFO[8][playerid]); 
    
GivePlayerWeapon(playerid24,999); 
    
GivePlayerWeapon(playerid34,999); 
    
SetPlayerInterior(playerid,0); 
    
spree[playerid] = 0
//////////////////////////////////////////////////////////////// 
    
DesapareceTexts(playerid); 
    return 
1

//OnPlayerDeath
PHP код:
public OnPlayerDeath(playeridkilleridreason

    if (
GetPVarInt(playerid"mortoPor") != INVALID_PLAYER_ID
    { 
        
killerid =  GetPVarInt(playerid"mortoPor"); 
        
SendDeathMessage(killeridplayeridArma[playerid]);
    } 
    else
    {
        
SendDeathMessage(killeridplayeridreason); 
    }
    new 
random(5); 
    switch(
s
    { 
        case 
0SetPlayerScore(killeridGetPlayerScore(killerid) + 5); 
        case 
1SetPlayerScore(killeridGetPlayerScore(killerid) + 10); 
        case 
2SetPlayerScore(killeridGetPlayerScore(killerid) + 15); 
        case 
3SetPlayerScore(killeridGetPlayerScore(killerid) + 18); 
        case 
4SetPlayerScore(killeridGetPlayerScore(killerid) + 20); 
    } 
    
pInfo[killerid][Matou]++; 
    
pInfo[playerid][Morreu]++; 
    
spree[killerid] ++; 
    switch(
spree[killerid]) 
    { 
        case 
1GameTextForPlayer(killerid,"~y~Mandou Pra Vala!",3000,1); 
        case 
2GameTextForPlayer(killerid,"~y~Double Kill",3000,1); 
        case 
3GameTextForPlayer(killerid,"~y~Triple Kill",3000,1); 
        case 
4GameTextForPlayer(killerid,"~y~Multi Kill",3000,1); 
        case 
6GameTextForPlayer(killerid,"~y~Triple Kill x2",3000,1); 
        case 
8GameTextForPlayer(killerid,"~y~Multi Kill x2",3000,1); 
        case 
10GameTextForPlayer(killerid,"~y~Monster Killer!",3000,1); 
        case 
15GameTextForPlayer(killerid,"~y~Holy Shit!",3000,1); 
        case 
20GameTextForPlayer(killerid,"~y~Insane Killer!",3000,1); 
        case 
30GameTextForPlayer(killerid,"~y~Fuckyea Killer!",3000,1); 
        case 
50GameTextForPlayer(killerid,"~y~HARD Killer!",3000,1); 
    } 
    return 
1

//OnPlayerGiveDamage

PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloat:amountweaponidbodypart)
{
    switch(
weaponid)
    {
        case 
24:amount 32.0//Eagle
        
case 25:amount 17.0//Shotgun
        
case 27:amount 15.0//Combat Shotgun
        
case 29:amount 5.0;  //MP5
        
case 30:amount 7.0;  //AK-47
        
case 31:amount 7.0;  //M4
        
case 42:amount 0.0;  //Extintor - Bombeiros
        
case 9:amount 0.0;  //Serra - Bombeiros
        
case 34:amount 100.0;
    }
    
PlayerPlaySound(damagedid17804,  0.00.00.0);
    
PlayerPlaySound(playerid17802,  0.00.00.0);
    new 
Float:LifeFloat:ColeeteFloat:Dano;
    
GetPlayerArmour(damagedidColeete);
    
GetPlayerHealth(damagedidLife);
    if(
Coleete 0)
    {
        if(
amount Coleete)
        {
            
Dano amount Coleete;
            
Life Life Dano;
            if(
Life <= 0)
            {
                
SetPVarInt(damagedid"mortoPor"playerid);
                
Arma[playerid] = weaponid;
            }
            
SetPlayerArmour(damagedid0.0);
            
SetPlayerHealth(damagedidLife);
        }
        else
        {
            
Coleete Coleete amount;
            
SetPlayerArmour(damagedidColeete);
        }
    }
    else if(
Coleete 1)
    {
        
Life Life amount;
        if(
Life <= 0)
        {
            
SetPVarInt(damagedid"mortoPor"playerid);
            
Arma[playerid] = weaponid;
        }
        
SetPlayerHealth(damagedidLife);
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)