Hallo Community & Scripter
Ich habe ein kleines Problem /spawnchange funktioniert nicht,
aber ich finde einfach keinen fehler, kann mir bitte jemand
helfen?
if(strcmp(cmd, "/spawnchange", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPhousekey] != 255)
{
if(Spectate[playerid] != 255 && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_RED, "Sie sind im TV.");
return 1;
}
if(SpawnChange[playerid])
{
SendClientMessage(playerid, COLOR_GREEN, "Sie spawnen nun an ihre Fraktion.");
SpawnChange[playerid] = 0;
if(IsAnInstructor(playerid))
{
if(SchoolSpawn[playerid] == 0)
{
SchoolSpawn[playerid] = 1;
SendClientMessage(playerid, COLOR_GREEN, "Sie spawnen nun an ihre Fraktion.");
}
else if(SchoolSpawn[playerid] == 1)
{
SchoolSpawn[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Sie spawnen nun an ihre Fraktion.");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "Sie spawnen nun bei ihrem Wohnplatz.");
SpawnChange[playerid] = 1;
}
}
else if(PlayerInfo[playerid][pPhousekey] == 255 && PlayerInfo[playerid][pLeader] <= 0 || PlayerInfo[playerid][pMember] <= 0 && PlayerInfo[playerid][pPhousekey] == 255)
{
if(PlayerInfo[playerid][pPhousekey] != 255)
{
if(PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pMember] == 0)
{
if(PlayerInfo[playerid][pObdachlosenheim] == 1)
{
if(ObdachlosenSpawn[playerid] == 0)
{
ObdachlosenSpawn[playerid] = 1;
SendClientMessage(playerid,rot,"Sie Spawnen nun in ihrem Obdachlosen Heim");
}
else if(ObdachlosenSpawn[playerid] == 1)
{
ObdachlosenSpawn[playerid] = 0;
SendClientMessage(playerid,rot,"Sie Spawnen nicht mehr in ihrem Obdachlosen Heim");
}
}
}
}
}
else if(PlayerInfo[playerid][pPhousekey] == 255)
{
if(IsAnInstructor(playerid))
{
if(SchoolSpawn[playerid] == 0)
{
SchoolSpawn[playerid] = 1;
SendClientMessage(playerid, COLOR_GREEN, "Sie spawnen nun an ihre Fraktion.");
}
else if(SchoolSpawn[playerid] == 1)
{
SchoolSpawn[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN, "Sie spawnen nun an ihre Fraktion.");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Sie besitzten keine Unterkunft.");
return 1;
}
}
}
return 1;
}
Danke im vorraus
MFG