Hallo ich folgendes Problem wenn ich sterbe bin ich im Krankenhaus und mache eine Crack anim so und wenn dann 30sec vorbei sind kommt das selbe nochmal obwohl ich dann eig. drausen sein müsste also irgendwo ist dort eine entlosschleife versteckt
Codeschnipsel
if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
if(FirstSpawn[playerid] != 1)
{
//new string[256];
new cut = deathcost;
SafeGivePlayerMoney(playerid, -cut);
MedicBill[playerid] = 0;
MedicTime[playerid] = 0;
NeedMedicTime[playerid] = 0;
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,1612.3240,-2330.1670,14.5469);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerHealth(playerid, 50.0);
PlayerInfo[playerid][pDeaths] += 1;
SetPlayerInterior(playerid, 3);
PlayerInfo[playerid][pInt] = 3;
rand = random(sizeof(gMedicSpawns));
SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 0);
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~w~You need to rest now ...", 30000, 3);
JustDied[playerid] = 1;
MedicTime[playerid] = 1;
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
if(PlayerInfo[playerid][pDonateRank] > 0)
{
NeedMedicTime[playerid] = 30;
}
else
{
NeedMedicTime[playerid] = 40;
}
PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
return 1;
}
}
if(JustDied[playerid] == 1)
{
if(GetPlayerVirtualWorld(playerid) != 0 || PlayerInfo[playerid][pVirWorld] != 0)
{
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pVirWorld] = 0;
}
SetPlayerPos(playerid, 1182.5638,-1323.5256,13.5790);
SetPlayerFacingAngle(playerid, 270.0);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}
if(MedicTime[i] > 0)
{
if(MedicTime[i] == 3)
{
SetPlayerInterior(i, 3);
PlayerInfo[i][pInt] = 3;
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X,Y,Z);
SetPlayerCameraPos(i, X - 3, Y, Z);
SetPlayerCameraLookAt(i,X,Y,Z);
}
MedicTime[i] ++;
if(MedicTime[i] >= NeedMedicTime[i])
{
new cut = deathcost;//PlayerInfo[playerid][pLevel]*deathcost;
//SafeGivePlayerMoney(i, -cut);
format(string, sizeof(string), "Doktor: Dein Behandlung kostet %d$. Einen schönen Tag noch.", cut);
SendClientMessage(i, TEAM_CYAN_COLOR, string);
TogglePlayerControllable(i, 1);
MedicBill[i] = 0;
MedicTime[i] = 0;
NeedMedicTime[i] = 0;
PlayerInfo[i][pDeaths] += 1;
PlayerFixRadio(i);
ClearAnimations(i);
SpawnPlayer(i);
}
}
mfg JoJu_RED