[Ajuda] OnPlayerDeath
#1

Eai galera, bom preciso de ajude de vocкs sobre um bugzinho.
O bug й o seguinte, quando logo no servidor, o cara spawna normalmente.
Mais quando morro, ele teria spawnar, mais ele fica uma < > (spawn).
Jб coloquei SpawnPlayer(); e SetSpawnInfo no OnPlayerDeath e nгo adiantou.
++ REP pra quem ajudar.
Reply
#2

Poste o seu OnPlayerDeath e o OnPlayerSpawn
Reply
#3

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
caller Mobile[playerid];
    if(
caller != 255)
    {
        if(
caller 255)
        {
            
SendClientMessage(caller,  CINZA"Morreram do outro lado da linha....");
            
CellTime[caller] = 0;
            
CellTime[playerid] = 0;
            
Mobile[caller] = 255;
        }
        
Mobile[playerid] = 255;
        
CellTime[playerid] = 0;
    }
    
format(StringContassizeof(StringContas), "Configuracoes/Contas/%s.txt"Nome(playerid));
    if(
DOF2_IsSet("Configuracoes/Admins.txt"Nome(playerid)))
    {
        
PlayerDados[playerid][Admin] = DOF2_GetInt("Configuracoes/Admins.txt"Nome(playerid));
    }
    
PlayerDados[playerid][Morreu]++;
    
PlayerDados[killerid][Matou]++;
    
SetPlayerSpawn(playerid);
    
killerid INVALID_PLAYER_ID;
    
KillTimer(TimerKit);
    return 
0;

PHP код:
public OnPlayerSpawn(playerid)
{
    
TextDrawShowForPlayer(playeridBarra);
    
TextDrawHideForPlayer(playeridintro1);
    
TextDrawHideForPlayer(playeridintro2);
    
TextDrawShowForPlayer(playeridTime);
    
TextDrawShowForPlayer(playeridDate);
    
ChecarTempoJogado(playerid);
    
TextDrawShowForPlayer(playeridZones[playerid]);
    
TextDrawShowForPlayer(playeridZones2[playerid]);
    if(
DOF2_IsSet("Configuracoes/Admins.txt"Nome(playerid))){PlayerDados[playerid][Admin] = DOF2_GetInt("Configuracoes/Admins.txt"Nome(playerid));}
    
SetTimerEx("VerificarPreso"1000false"i"playerid);
     
CheckInfoOrg_GreeN(playerid);
     
gTeam[playerid] = PlayerDados[playerid][pTeam]; //Set the Team
     
PlayerDados[playerid][pTeam] = 3;
    if(
gTeam[playerid] == 3)
    {
        if(
PlayerDados[playerid][MembroOrg] > || PlayerDados[playerid][LiderOrg] > 0)
        {
            
// Policia Militar
            
if(PlayerDados[playerid][MembroOrg] == 2) { SetSpawnInfo(playerid11PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
            
PlayerDados[playerid][pTeam] = 11gTeam[playerid] = 11;
            }
             
// Groove Street
              
else if(PlayerDados[playerid][MembroOrg] == 3) { SetSpawnInfo(playerid10PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
              
PlayerDados[playerid][pTeam] = 10gTeam[playerid] = 10;
              }
              
//Ballas
              
else if(PlayerDados[playerid][MembroOrg] == 4) { SetSpawnInfo(playerid10PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
              
PlayerDados[playerid][pTeam] = 10gTeam[playerid] = 10;
              }
              
//Los Vagos
              
else if(PlayerDados[playerid][MembroOrg] == 5) { SetSpawnInfo(playerid10PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
              
PlayerDados[playerid][pTeam] = 10gTeam[playerid] = 10;
              }
              
            
//Governo
            
else if(PlayerDados[playerid][LiderOrg] == 1) { SetSpawnInfo(playerid11PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
            
PlayerDados[playerid][pTeam] = 11gTeam[playerid] = 11;
            }
            
//Policia Militar
            
else if(PlayerDados[playerid][LiderOrg] == 2) { SetSpawnInfo(playerid11PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
            
PlayerDados[playerid][pTeam] = 11gTeam[playerid] = 11;
            }
            
//Groove Street
            
else if(PlayerDados[playerid][LiderOrg] == 3) { SetSpawnInfo(playerid10PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
            
PlayerDados[playerid][pTeam] = 10gTeam[playerid] = 10;
            }
            
//Ballas
            
else if(PlayerDados[playerid][LiderOrg] == 4) { SetSpawnInfo(playerid10PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
            
PlayerDados[playerid][pTeam] = 10gTeam[playerid] = 10;
            }
            
//Los Vagos
            
else if(PlayerDados[playerid][LiderOrg] == 5) { SetSpawnInfo(playerid10PlayerDados[playerid][SkinJogador],0.0,0.0,0.0,0,0,0,0,0,0,0);
            
PlayerDados[playerid][pTeam] = 10gTeam[playerid] = 10;
            }
            
SpawnPlayer(playerid);
        }
    }
    
SetPlayerSpawn(playerid);
    
SetPlayerToTeamColor(playerid);
     
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=--=-=-=-=-=-=
    
return 1;

Reply
#4

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new caller = Mobile[playerid];
    if(caller != 255)
    {
        if(caller < 255)
        {
            SendClientMessage(caller,  CINZA, "Morreram do outro lado da linha....");
            CellTime[caller] = 0;
            CellTime[playerid] = 0;
            Mobile[caller] = 255;
        }
        Mobile[playerid] = 255;
        CellTime[playerid] = 0;
    }
    format(StringContas, sizeof(StringContas), "Configuracoes/Contas/%s.txt", Nome(playerid));
    if(DOF2_IsSet("Configuracoes/Admins.txt", Nome(playerid)))
    {
        PlayerDados[playerid][Admin] = DOF2_GetInt("Configuracoes/Admins.txt", Nome(playerid));
    }
    PlayerDados[playerid][Morreu]++;
    PlayerDados[killerid][Matou]++;
    SpawnPlayer(playerid);
    killerid = INVALID_PLAYER_ID;
    KillTimer(TimerKit);
    return 0;
}
Reply
#5

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new caller = Mobile[playerid];
    if(caller != 255)
    {
        if(caller < 255)
        {
            SendClientMessage(caller,  CINZA, "Morreram do outro lado da linha....");
            CellTime[caller] = 0;
            CellTime[playerid] = 0;
            Mobile[caller] = 255;
        }
        Mobile[playerid] = 255;
        CellTime[playerid] = 0;
    }
    format(StringContas, sizeof(StringContas), "Configuracoes/Contas/%s.txt", Nome(playerid));
    if(DOF2_IsSet("Configuracoes/Admins.txt", Nome(playerid)))
    {
        PlayerDados[playerid][Admin] = DOF2_GetInt("Configuracoes/Admins.txt", Nome(playerid));
    }
    PlayerDados[playerid][Morreu]++;
    PlayerDados[killerid][Matou]++;
    SetPlayerSpawn(playerid);
    killerid = INVALID_PLAYER_ID;
    KillTimer(TimerKit);
    return true;
}
Ele executa as funзхes que vocк coloco pelo menos?
Tipo o Mobile, PlayerDados etc... ?
Reply
#6

sim sim, executa aparece no /identidade q eu tenha 1 morte, mais ele fica akela setinha < > spawn.
testei o do don speed nao adiantou.
Reply
#7

Me manda uma MP, com o IP do seu server.
Reply
#8

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new caller = Mobile[playerid];
    if(caller != 255)
    {
        if(caller < 255)
        {
            SendClientMessage(caller,  CINZA, "Morreram do outro lado da linha....");
            CellTime[caller] = 0;
            CellTime[playerid] = 0;
            Mobile[caller] = 255;
        }
        Mobile[playerid] = 255;
        CellTime[playerid] = 0;
    }
    format(StringContas, sizeof(StringContas), "Configuracoes/Contas/%s.txt", Nome(playerid));
    if(DOF2_IsSet("Configuracoes/Admins.txt", Nome(playerid)))
    {
        PlayerDados[playerid][Admin] = DOF2_GetInt("Configuracoes/Admins.txt", Nome(playerid));
    }
    PlayerDados[playerid][Morreu]++;
    PlayerDados[killerid][Matou]++;
   SpawnPlayer(playerid);
    return true;
}
Reply
#9

infelizmente ainda continua aquela < > spawn =\
Reply
#10

Vc usa Filterscript Intro ?, Se tiver й isso Tire esse Fs de intro pois ela й pra server de DM ; e nгo tem spawn por iss buga
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)