Hey leute,
ich hab ein ganz normales GF und irgendwie immer wenn ein Spieler stirbt (egal wie) crasht der User daneben. Kann das vllt an SpawnPlayer oder etwas liegen?
//#############################################[ Wiederbelebung ]#########################################
if(PlayerInfo[playerid][pLevel] >= 1 && KHSperre[playerid] == 0 && PlayerChallenge[playerid] == 0 && PlayerInfo[playerid][pPriCP] == 0 && PlayerInLVArena[playerid] == 0 && PlayerInLSArena[playerid] == 0 && PlayerInfo[playerid][pJailed] == 0 && EventDuty[playerid] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && gangfightkill[playerid] == 0 && AdminDuty[playerid] == 0 && PlayerInfo[playerid][pTot] == 0 && gangfightkill[playerid] == 0)
{
PlayerInfo[playerid][pTot] = 1;
new Float:pX,Float:pY,Float:pZ,playaname[MAX_PLAYER_NAME],str[64];
GetPlayerName(playerid,playaname,sizeof(playaname));
GetPlayerPos(playerid, pX, pY, pZ);
KadaverX[playerid] = pX;
KadaverY[playerid] = pY;
KadaverZ[playerid] = pZ;
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
SetPlayerCameraPos(playerid,1521.2195,-1613.5698,27.4405);
SetPlayerPos(playerid,1493.0571,-1565.8458,-6.4895);
SetPlayerCameraLookAt(playerid,1519.4076,-1582.1859,21.6170);
TotenKopf[playerid] = CreateDynamicPickup(1241,1, pX, pY, pZ);
format(str,sizeof(str),"%s [ID: %d]",playaname,playerid);
TotenLabel[playerid] = Create3DTextLabel(str,COLOR_LIGHTRED,pX, pY, pZ,10.0,0,0);
SetPlayerHealth(playerid,5);
SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
Totentimer[playerid] = SetTimerEx("DeleteTotenkopf",181000,false,"i",playerid);
TodTimer[playerid] = SetTimerEx("NachBehandlung2",180000,false,"i",playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Krankenhaus]: {FFFFFF}Du bist in Ohnmacht gefallen und wurdest ins Krankenhaus gebracht.");
SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Krankenhaus]: {FFFFFF}Du ruhst dich nun 3 Minuten aus.");
FreezePlayer(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInFrac(i,4) && PlayerInfo[i][pTot] == 0 && OnDuty[i] == 1 || FOnDuty[i] == 1)
{
SendClientMessage(i,COLOR_DBLUE,"[HQ]: {FFFFFF}Wir haben einen neuen Notruf!");
SendClientMessage(i,COLOR_DBLUE,"[HQ]: {FFFFFF}Koordinaten werden auf das Navi übertragen.(/opfer)");
}
}
}
else
{
SpawnPlayer(playerid);
}
//##########################################################################################################
MfG