Hay wenn ich sterbe komme ich 2x ins Krankenhaus.. also ich sterbe durch erschießen oder anderes komme raus Spawne und komme wieder ins Krankenhaus
Unter OnPlayerDeath hab ich das:
if(PlayerPaintballing[playerid] == 0 && FirstSpawn[playerid] == 0)
{
PlayerInfo[playerid][pTot] = 1;
GetPlayerName(playerid, name, sizeof(name));
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid,COLOR_LIGHTBLUE, "Du wurdest schwer verletzt ins Krankenhaus gebracht!");
GameTextForPlayer(playerid, "~r~Im Krankenhaus ~n~~w~ Dauer: 1 Minute", 60000, 4);
SetPlayerPos(playerid,1162.871704, -1339.109619, 14.297291);
SetPlayerCameraPos(playerid, 1223.379028, -1333.354126, 33.809105);
SetPlayerCameraLookAt(playerid, 1178.824829, -1325.804077, 13.284119);
TogglePlayerControllable(playerid, 0);
/*if(GetPlayerInterior(playerid) == 0)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pMember] == 4 || PlayerInfo[i][pLeader] == 4)
{
// SendClientMessage(i,COLOR_LIGHTBLUE,"[Funk:]Eine Person wurde als schwer verletzt gemeldet!");
// SetPlayerCheckpoint(i,PlayerInfo[playerid][pTx],PlayerInfo[playerid][pTy],PlayerInfo[playerid][pTz],5.0);
}
}
}*/
}
if(FirstSpawn[playerid] == 1)
{
FirstSpawn[playerid] = 0;
}
und unter OnPlayerSpawn das:
if(PlayerInfo[playerid][pTot] == 1 && FirstSpawn[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungen liegst du im Koma");
TogglePlayerControllable(playerid, 0);
TextDrawHideForPlayer(playerid, Kmh);
TextDrawHideForPlayer(playerid, Benzin);
TextDrawHideForPlayer(playerid, Schaden);
TextDrawHideForPlayer(playerid, kmhanzeige[playerid]);
TextDrawHideForPlayer(playerid, schadenanzeige[playerid]);
TextDrawHideForPlayer(playerid, benzinanzeige[playerid]);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1162.871704, -1339.109619, 14.297291);
SetPlayerCameraPos(playerid, 1223.379028, -1333.354126, 33.809105);
SetPlayerCameraLookAt(playerid, 1178.824829, -1325.804077, 13.284119);
GameTextForPlayer(playerid, "~r~Im Krankenhaus ~n~~w~ Dauer: 1 Minute", 60000, 3);
SetPlayerInterior(playerid, 0);
return 1;
}