17/08/2023 00:42
(Esta mensagem foi modificada pela última vez a: 17/08/2023 15:38 por xbruno1000x.)
Ola, estou tendo um problema com um bug no mobile quando o mobile morre ele crash se tive como me ajuda agradeço
na callbeck: OnPlayerDeath tem isto nao sei se isso causa problema no mobile creio que nao
if(PlayerData[playerid][pLogado] == true)
{
if(PlayerData[playerid][pMorreu] == 0)// Se feriu
{
new Float:pos[4];
PlayerData[playerid][pMorreu] = 1;
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
GetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
GetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
SetSpawnInfo(playerid, NO_TEAM, PlayerData[playerid][pSkin], PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ], PlayerData[playerid][pPosA], 0, 0, 0, 0, 0, 0);
PlayerData[playerid][pInterior] = GetPlayerInterior(playerid);
PlayerData[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
PlayerData[playerid][pSkin] = GetPlayerSkin(playerid);
return 1;
}
if(PlayerData[playerid][pMorreu] == 1)// Foi finalizado
{
PlayerData[playerid][pMorreu] = 2;
KillTimer(TimerFerido[playerid]);
PlayerData[playerid][pInterior] = GetPlayerInterior(playerid);
PlayerData[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
PlayerData[playerid][pSkin] = GetPlayerSkin(playerid);
}
}
na callbeck: OnPlayerDeath tem isto nao sei se isso causa problema no mobile creio que nao
if(PlayerData[playerid][pLogado] == true)
{
if(PlayerData[playerid][pMorreu] == 0)// Se feriu
{
new Float:pos[4];
PlayerData[playerid][pMorreu] = 1;
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
GetPlayerFacingAngle(playerid, pos[3]);
GetPlayerPos(playerid, PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ]);
GetPlayerFacingAngle(playerid, PlayerData[playerid][pPosA]);
SetSpawnInfo(playerid, NO_TEAM, PlayerData[playerid][pSkin], PlayerData[playerid][pPosX], PlayerData[playerid][pPosY], PlayerData[playerid][pPosZ], PlayerData[playerid][pPosA], 0, 0, 0, 0, 0, 0);
PlayerData[playerid][pInterior] = GetPlayerInterior(playerid);
PlayerData[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
PlayerData[playerid][pSkin] = GetPlayerSkin(playerid);
return 1;
}
if(PlayerData[playerid][pMorreu] == 1)// Foi finalizado
{
PlayerData[playerid][pMorreu] = 2;
KillTimer(TimerFerido[playerid]);
PlayerData[playerid][pInterior] = GetPlayerInterior(playerid);
PlayerData[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
PlayerData[playerid][pSkin] = GetPlayerSkin(playerid);
}
}