public OnPlayerEnterCheckpoint(playerid)
{
if(CarregarSprunk[0][playerid] == 1) {
CarregarSprunk[0][playerid] = 0;
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 498) {
TogglePlayerControllable(playerid, false);
RandomSprunks = random(3);
switch(RandomSprunks)
{
case 0: CarregarSprunk[1][playerid] = SetPlayerCheckpoint(playerid, 1659.506958, 1721.457031, 10.828111, 1.0);
case 1: CarregarSprunk[2][playerid] = SetPlayerCheckpoint(playerid, -1455.217651, 2593.229248, 55.835937, 1.0);
case 2: CarregarSprunk[3][playerid] = SetPlayerCheckpoint(playerid, -14.815089, 1176.700927, 19.563381, 1.0);
}
}
}
DisablePlayerCheckpoint(playerid);
return true;
}
|
Faзa um debug e veja se o valor da variбvel RandomSprunks estб assumindo algum valor dos cases.
|
linha if(CarregarSprunk[0]... == 1, id de jogador: 0 posicao X obtida quando digitou: 1340.215087 linha do freezeplayer, id de jogador: 0 posicao X obtida quando digitou: 1340.215087 case 1, id de jogador: 0 posicao X obtida quando digitou: 1340.215087 linha if(CarregarSprunk[0]... == 1, id de jogador: 0 posicao X obtida quando digitou: 1341.641479 linha do freezeplayer, id de jogador: 0 posicao X obtida quando digitou: 1341.641479
|
O problema estб na linha DisablePlayerCheckpoint(playerid). Vocк estб setando o checkpoint e em seguida removendo o mesmo.
|