Kommt er überhaupt zu OnPlayerSpawn? Soll heissen, nach OnPlayerRequestClass sollte SpawnPlayer kommen. Im übrigen fehlt dir oben ein RETURN 1; und eine Klammer.
Function OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
M_OnPlayerSpawn(playerid);
TextDrawShowForPlayer(playerid,Copyright);
TextDrawShowForPlayer(playerid,Datum);
GW_OnPlayerSpawn(playerid);
if(PlayerInfo[playerid][pTot] == 1 && PlayerInfo[playerid][pLevel] > 1)
{
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_LIGHTRED, " ");
SendClientMessage(playerid, COLOR_YELLOW, "|________ Krankenhaus ________|");
SendClientMessage(playerid, COLOR_ORANGE, "Du bist gestorben , deswegen bist du im Krankenhaus");
SendClientMessage(playerid, COLOR_ORANGE, "Warte 60 Sekunden bis deine Behandlung fertig ist!");
SetPlayerSpawn(playerid);
if(IsPlayerInFrac(playerid, 1))
{
SetPlayerColor(playerid,NAMECOLOR_LSCOP);
}
else if(IsPlayerInFrac(playerid, 4))
{
SetPlayerColor(playerid, NAMECOLOR_MEDIC);
}
else
{
SetPlayerColor(playerid,TEAM_HIT_COLOR);
}
ResetPlayerWeapons(playerid);
return 1;
}
STDPlayer[playerid] = 0;
gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
if (gTeam[playerid] == 4) //medic / criminal reset team
{
gTeam[playerid] = 3;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "** Du musst dich vorher einloggen oder dir einen Account erstellen! ***");
Kick(playerid);
return 1;
}
if(gPlayerAccount[playerid] == 1)
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, 0);
}
else if(gPlayerAccount[playerid] == 0)
{
ForceClassSelection(playerid);
TogglePlayerSpectating(playerid, 0);
}
if(AtClothes[playerid] == 1)
{
PlayerInfo[playerid][pChar] = GetPlayerSkin(playerid);
PlayerInfo[playerid][pModel] = GetPlayerSkin(playerid);
AtClothes[playerid] = 0;
}
if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
{
MedicBill[playerid] = 0;
new rand = random(sizeof(CIV));
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Chef dieser Familie, du bist Zivilist !");
PlayerInfo[playerid][pTeam] = 3;
gTeam[playerid] = 3;
SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[playerid][pModel] = CIV[rand];
// entfernen ---> SpawnPlayer(playerid);
}
return 1;
}
Alles anzeigen
Falls dies nicht geht, entfern mal deinen Code innerhalb OnPlayerSpawn und hau da mal ein
print("ich spawne");
return 1;
zum Testen rein.