Liebe Community,
Mitspieler von meinen Server sind Tod nachdem Sie das erstemal Connected sind (beim Registrieren und beim Login), warum?
Ich habe dies alle eingefügt:
OnPlayerConnect:
SetPlayerHealth(playerid, 100);
pIstTot[playerid] = 0;
PlayerInfo[playerid][pTod] = 0;
SetPlayerSpawn:
if(PlayerInfo[playerid][pTod] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungen liegst du im Koma.");
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerSkin(playerid,GetPVarInt(playerid,"tot_Skin"));
SetPlayerPos(playerid,941.7925,1734.3978,21.1277);
SetPlayerCameraPos(playerid, 993.5776,1653.3435,10.3279);
SetPlayerCameraLookAt(playerid, 949.7623,1748.0996,26.2525);
SetPlayerInterior(playerid, 0);
return 1;
}
OnPlayerDeath
PlayerInfo[playerid][pTod] = 1;
OnPlayerSpawn:
if(PlayerInfo[playerid][pTod] == 1)
{
SetPVarInt(playerid,"tot_Skin",GetPlayerSkin(playerid));
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_YELLOW, "|________ | Krankenhaus | ________|");
SendClientMessage(playerid, COLOR_LIGHTRED, "Durch deine schweren Verletzungen liegst du im Koma!");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Sie sind für 2 bis 3 Minuten im Krankenhaus.");
SendClientMessage(playerid, COLOR_LIGHTRED, "In 2 bis 3 Minuten kommen Sie wieder raus, da Sie gerade behandelt werden.");
SetPlayerPos(playerid,941.7925,1734.3978,21.1277);
SetPlayerCameraPos(playerid, 993.5776,1653.3435,10.3279);
SetPlayerCameraLookAt(playerid, 949.7623,1748.0996,26.2525);
TogglePlayerControllable(playerid,0);
SetPlayerColor(playerid, COLOR_ZIVI);
ResetPlayerWeapons(playerid);
return 1;
}
OnPlayerLogin:
pIstTot[playerid] = 0;
PlayerInfo[playerid][pTod] = 0;
TOTTimer
public TOTTimer()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pTod] == 1)
{
pIstTot[i] += 1;
}
if(PlayerInfo[i][pTod] == 1 && pIstTot[i] == 3)//die 8 ändern in die anzahl der minuten die ihr im KH sein wollt
{
PlayerInfo[i][pTod] = 0;
pIstTot[i] = 0;
SetPlayerVirtualWorld(i,0);
SetPlayerSpawn(i);
SpawnPlayer(i);
SendClientMessage(i, COLOR_LIGHTGREEN, "Du bist nun aus dem Krankenhaus entlassen!");
SetPlayerPos(i,957.6639,1733.9774,9.0391);
SetPlayerSkin(i,GetPVarInt(i,"tot_Skin"));
TogglePlayerControllable(i,1);
DestroyPickup(TotenKopf[i]);
}
}
}
}
Muss ich dies was bei OnPlayerLogin steht auch bei OnPlayerRegister einfügen?
Ich hoffe ihr könnt helfen
MfG
James.