[Ajuda] Desisto!
#1

Bom galera, estou com um bug que ainda nгo foi resolvido, alguns amigos aqui tentaram resolver, mais infelizmente o bug superou.

Qual й o bug ?
Quando o cara se registra/loga, ele spawna certinho.
Quando morre, ele nгo spawna, fica
Quote:

< > (spawn)

Alguйm poderia ajudar?

OnPlayerDeath:
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    
PlayerDados[playerid][Morreu]++;
    
PlayerDados[killerid][Matou]++;
    
SpawnPlayer(playerid);
    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), "VirtualStreet/Contas/%s.txt", Nome(playerid));
    if(DOF2_IsSet("VirtualStreet/Admins.txt", Nome(playerid)))
    {
        PlayerDados[playerid][Admin] = DOF2_GetInt("VirtualStreet/Admins.txt", Nome(playerid));
    }*/
    
killerid INVALID_PLAYER_ID;
    
KillTimer(TimerKit);
    return 
true;

OnPlayerSpawn:
PHP код:
public OnPlayerSpawn(playerid)
{
    if (
PlayerDados[playerid][TutorialOk] == 0)
    {
    
ShowPlayerDialog(playeridRSEXODIALOG_STYLE_MSGBOX"{FFFFFF}Escolha seu sexo","{FFE4C4}========================================\n\n{9AFF9A}Escolha seu {FFFFFF}sexo{9AFF9A}.\n\n{9AFF9A}Se vocк for um {C6E2FF}'Homem' {9AFF9A}clique em {C6E2FF}'Masculino'{9AFF9A}.\n\n{9AFF9A}Se vocк for uma {FFB5C5}'Mulher' {9AFF9A}clique em {FFB5C5}'Feminino'{9AFF9A}.\n\n{FFE4C4}========================================""Masculino""Feminino");
    }
     
format(StringContassizeof(StringContas), "VirtualStreet/Contas/%s.txt"Nome(playerid));
    if(
DOF2_IsSet("VirtualStreet/Admins.txt"Nome(playerid)))
    {
        
PlayerDados[playerid][Admin] = DOF2_GetInt("VirtualStreet/Admins.txt"Nome(playerid));
    }
    
ChecarTempoJogado(playerid);
    
//SetTimerEx("VerificarPreso", 1000, false, "i", playerid);
     
CheckInfoOrg_Thiago(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;

SetPlayerSpawn:
PHP код:
public SetPlayerSpawn(playerid)
{
    if(
IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
        
//SetPlayerHealth(playerid, 100.0);
        
if(PlayerDados[playerid][MembroOrg] == || PlayerDados[playerid][LiderOrg] == 1)//Prefeito
        
{
            
ResetPlayerWeapons(playerid);
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerInterior(playerid3);
            
SetPlayerPos(playerid354.8267,154.4102,1025.7964);
            
PlayerDados[playerid][Interior] = 3;
            
SetPlayerArmour(playerid100);
            
SetPlayerWantedLevel(playerid0);
            
LocalPrefeitura[playerid] = 1;
            
//ClearChatbox(playerid, 100);
            
SetPlayerToTeamColor(playerid);
            return 
true;
        }
        if(
PlayerDados[playerid][MembroOrg] == || PlayerDados[playerid][LiderOrg] == 2)//Policia Militar
        
{
            
ResetPlayerWeapons(playerid);
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid, -1615.4965,673.9544,-4.9063);
            
PlayerDados[playerid][Interior] = 0;
            
SetPlayerArmour(playerid100);
            
SetPlayerWantedLevel(playerid0);
            
SetPlayerFacingAngle(playerid,360);
            
//ClearChatbox(playerid, 100);
            
SetPlayerToTeamColor(playerid);
            return 
true;
        }
        if(
PlayerDados[playerid][MembroOrg] == || PlayerDados[playerid][LiderOrg] == 3)//Groove Street
        
{
            
ResetPlayerWeapons(playerid);
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid, -2459.0842,774.8869,35.1719);
            
PlayerDados[playerid][Interior] = 0;
            
SetPlayerArmour(playerid100);
            
SetPlayerFacingAngle(playerid,0);
            
//ClearChatbox(playerid, 100);
            
SetPlayerToTeamColor(playerid);
            return 
true;
        }
        if(
PlayerDados[playerid][MembroOrg] == || PlayerDados[playerid][LiderOrg] == 4)//Ballas
        
{
            
ResetPlayerWeapons(playerid);
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid, -2467.7896,136.8996,35.1719);
            
PlayerDados[playerid][Interior] = 0;  
            
SetPlayerArmour(playerid100);
            
SetPlayerFacingAngle(playerid,314.9683);
            
//ClearChatbox(playerid, 100);
            
SetPlayerToTeamColor(playerid);
            return 
true;
        }
        if(
PlayerDados[playerid][MembroOrg] == || PlayerDados[playerid][LiderOrg] == 5)//Los Vagos
        
{
            
ResetPlayerWeapons(playerid);
            
SetPlayerVirtualWorld(playerid,0);
            
SetPlayerInterior(playerid0);
            
SetPlayerPos(playerid, -2519.9216,1214.1395,37.4283);
            
PlayerDados[playerid][Interior] = 0;
            
SetPlayerArmour(playerid100);
            
SetPlayerFacingAngle(playerid,8.3925);
            
//ClearChatbox(playerid, 100);
            
SetPlayerToTeamColor(playerid);
            return 
true;
        }
        else
        {
            
ResetPlayerWeapons(playerid);
            
SetPlayerPos(playerid,-1973.3794,137.7854,27.6875);
            
SetPlayerFacingAngle(playerid,90.0);
            
SetCameraBehindPlayer(playerid);
            
SetPlayerHealth(playerid100.0);
            
SetPlayerSkin(playeridPlayerDados[playerid][SkinJogador]);
            
SetPlayerToTeamColor(playerid);
            return 
true;
        }
    }
    return 
true;

++ REP PRA QUEM AJUDAR.
Reply
#2

Fs intro ...
Reply
#3

Como assim, eu nгo uso FS.
Reply
#4

Nгo precisa colocar SpawnPlayer(playerid); em OnPlayerDeath
Reply
#5

Vini obrigado por pelo menos responder cara, mais ninguйm resolveu isso, ja tirei o SpawnPlayer, e nada adiantou, continua o mesmo bug.
Reply
#6

Jб fez debug desse cуdigo?
Reply
#7

o q й isso, e como q faz ?

@Editando:

Tipo quando acontece o bug, eu tenho q apertar 'Shift', ai o cara spawna, sу queria q fosse direto que nen os outros server's, mais as funзхes de matou/morreu funcionam normalmente, eu digito /rg e aparece normal.
Reply
#8

Vocк pode fazer um simples e bem eficaz, pra saber exatamente onde se encontra o problema.

Espalhe alguns SendClientMessageToAll por estes cуdigos, cada um com um nъmero diferente.

Ex:

pawn Код:
public SetPlayerSpawn(playerid)
{
    SendClientMessageToAll(-1,"1"); // 1
    if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
    {
        //SetPlayerHealth(playerid, 100.0);
        SendClientMessageToAll(-1,"2"); // 2
        if(PlayerDados[playerid][MembroOrg] == 1 || PlayerDados[playerid][LiderOrg] == 1)//Prefeito
        {
            ResetPlayerWeapons(playerid);
            SetPlayerVirtualWorld(playerid,0);
            SetPlayerInterior(playerid, 3);
            SetPlayerPos(playerid, 354.8267,154.4102,1025.7964);
            PlayerDados[playerid][Interior] = 3;
            SetPlayerArmour(playerid, 100);
            SetPlayerWantedLevel(playerid, 0);
            LocalPrefeitura[playerid] = 1;
            //ClearChatbox(playerid, 100);
            SetPlayerToTeamColor(playerid);
            return true;
        }
        SendClientMessageToAll(-1,"3"); // 3
        if(PlayerDados[playerid][MembroOrg] == 2 || PlayerDados[playerid][LiderOrg] == 2)//Policia Militar
        {
Faзa isso por todo o cуdigo, e descubra em que ponto as funзхes nгo funcionam como deveria.
Reply
#9

bom Vini, obrigado pela sua atenзгo, mais infelizmente nгo deu, tentei fazer um gamemode do 0, codei 8 mil linhas, mais infelizmente este bug ###### tudo. Obrigado, infelizmente nгo estou conseguindo dar ++REP pra vc.
Reply
#10

Acho que jogar 8 mil linhas pelo ralo й besteira ; )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)