was ist hier falsch
Function SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pTot] == 1 && PlayerInfo[playerid][pLevel] > 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerInfo[playerid][pGangJailed] == 0 && PlayerPaintballing[playerid] == 0)
{
//if(PlayerInfo[playerid][pZivispawn] == 0) // SF AREA
if(IsPlayerInArea(playerid,-2999.9465,-2999.9978,-991.2031,2594.2344))
{
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,-2655.4385,641.4149,51.1221);
SetPlayerCameraPos(playerid, -2565.9475,660.0692,62.4913);
SetPlayerCameraLookAt(playerid, -2655.4385,641.4149,51.1221);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
FreezePlayer(playerid);
}
// else if(PlayerInfo[playerid][pZivispawn] == 1) // LV AREA
if(IsPlayerInArea(playerid, -973.9219,396.0000,2986.5720,2989.9180))
{
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,1594.6398,1766.0209,24.6398);
SetPlayerCameraPos(playerid, 1555.9191,1769.1615,20.4710);
SetPlayerCameraLookAt(playerid, 1594.6398,1766.0209,24.6398);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
FreezePlayer(playerid);
}
else
{
TogglePlayerControllable(playerid, 0);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,-2655.4385,641.4149,51.1221);
SetPlayerCameraPos(playerid, -2565.9475,660.0692,62.4913);
SetPlayerCameraLookAt(playerid, -2655.4385,641.4149,51.1221);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
FreezePlayer(playerid);
}
return 1;
}
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "NeuerBot", true))
{
PlayerInfo[playerid][pCarLic] = 1;
PlayerInfo[playerid][pChar] = 255;
PlayerInfo[playerid][pJob] = 14;
SetPlayerSkin(playerid, 255);
//PutPlayerInVehicle(playerid, car_BulletLS, 0);
}
}
if(PlayerInfo[playerid][pTut] == 0 && !IsPlayerNPC(playerid))
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
FreezePlayer(playerid);
AtRegestration[playerid] = 1;
RegistrationStep[playerid] = 1;
//SendClientMessage(playerid, COLOR_YELLOW, " ");
//SendClientMessage(playerid, COLOR_LIGHTRED, " Bist du Männlich oder Weiblich?");
ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Gib bitte dein Geschlecht an.","Männlich","Weiblich");
//----------------
SetPlayerPos(playerid,1424.7075,-980.6817,53.9398);
SetPlayerFacingAngle(playerid, 4.0557);
SetPlayerInterior(playerid,0);
SetPlayerCameraPos(playerid, 1431.3164,-975.2504,57.5156);
SetPlayerCameraLookAt(playerid,1422.5352,-912.2574,76.5841);
//ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Welches Geschlecht bist du?","Männlich","Weiblich");
//ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login to your account",s,"Login","Cancel");
// ShowMenuForPlayer(Geschlecht,playerid);
}
if(PlayerInfo[playerid][pTut] == 0 && !IsPlayerNPC(playerid))
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
FreezePlayer(playerid);
AtRegestration[playerid] = 1;
RegistrationStep[playerid] = 1;
//SendClientMessage(playerid, COLOR_YELLOW, " ");
//SendClientMessage(playerid, COLOR_LIGHTRED, " Bist du Männlich oder Weiblich?");
//ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_INPUT,"Geworben","Von wem wordest du geworben ?","Weiter","abbrechen");
//----------------
SetPlayerPos(playerid,1424.7075,-980.6817,53.9398);
SetPlayerFacingAngle(playerid, 4.0557);
SetPlayerInterior(playerid,0);
SetPlayerCameraPos(playerid,1431.3164,-975.2504,57.5156);
SetPlayerCameraLookAt(playerid,1422.5352,-912.2574,76.5841);
//ShowPlayerDialog(playerid,DIALOG_REGSTEP_1,DIALOG_STYLE_MSGBOX,"Geschlecht","Bist du Männlich oder Weiblich?","Erstellen","Abbrechen");
//ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login to your account",s,"Login","Cancel");
// ShowMenuForPlayer(Geschlecht,playerid);
}
new rand;
new house = PlayerInfo[playerid][pPhousekey];
if(PlayerPaintballing[playerid] != 0)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 29, 999);
GivePlayerWeapon(playerid, 24, 999);
rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
return 1;
}
if(KnastTime[playerid] > 0)
{
SetPlayerToKnast(playerid,Knast[playerid]);
SendClientMessage(playerid, COLOR_LIGHTRED, "!Flüchten bringt nichts, zurück in die Zelle!");
SetPlayerInterior(playerid,3);
return 1;
}
if(PlayerInfo[playerid][pJailed] == 1)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,193.7812,162.1770,1003.0234);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pInt] = 3;
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTRED, "!!Flüchten bringt nichts, zurück in die Zelle!");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Du wurdest wieder ins Gefängnis gebracht!");
SetPlayerInterior(playerid,3);
PlayerInfo[playerid][pInt] = 3;
SetCameraBehindPlayer(playerid);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid,193.7812,162.1770,1003.0234);
return 1;
}
if(PlayerInfo[playerid][pGangJailed] == 1)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 218.9510,-231.8540,1.7786);
SetCameraBehindPlayer(playerid);
ResetPlayerWeapons(playerid);
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTRED, " Du befindest dich noch im GangJail!");
return 1;
}
if(house != 255)
{
if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
{
GivePlayerWeapons(playerid);
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,HouseInfo[house][hInt]);
SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
PlayerInfo[playerid][pLocal] = house;
PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
SetPlayerVirtualWorld(playerid,house);
return 1;
}
}
if (PlayerInfo[playerid][pMember] == 1 PlayerInfo[playerid][pLeader] == 1)// Police
{
SetPlayerToTeamColor(playerid);
GivePlayerWeapons(playerid);
SetPlayerPos(playerid,216.5404,168.6841,1003.0234); // Warp the player
SetPlayerFacingAngle(playerid,random(360));
SetPlayerInterior(playerid,3);
return 1;
}
if (PlayerInfo[playerid][pMember] == 2 PlayerInfo[playerid][pLeader] == 2) //FBI
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,6);
GivePlayerWeapons(playerid);
SetPlayerPos(playerid,216.5404,168.6841,1003.0234);
SetPlayerFacingAngle(playerid,273.0);
SetPlayerArmour(playerid, 100);
return 1;
}
Die andren fraktionen
if(IsAnInstructor(playerid)) //Fahrschule spawn
{
if(SchoolSpawn[playerid] == 0)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,-2022.2632,-116.6569,1035.1719);
SetPlayerFacingAngle(playerid,4.7173);
SetPlayerInterior(playerid,3);
PlayerInfo[playerid][pInt] = 0;
SetPlayerHealth(playerid, 100);
GivePlayerWeapons(playerid);
}
else if(SchoolSpawn[playerid] == 1)
{
SetPlayerToTeamColor(playerid);
SetPlayerPos(playerid,2145.5706,-1803.3696,16.1406);
SetPlayerFacingAngle(playerid,4.7173);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerHealth(playerid, 100);
GivePlayerWeapons(playerid);
}
return 1;
}
else
{
SetPlayerToTeamColor(playerid);
/*if(PlayerInfo[playerid][pOrigin] == 1 PlayerInfo[playerid][pOrigin] == 2 PlayerInfo[playerid][pOrigin] == 3)
{
SetPlayerPos(playerid,-1423.1486,-287.0710,14.1484);// 922.7817,-919.9584,42.6016
SetPlayerFacingAngle(playerid,358.8067);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pRollerLic] = 1;
PlayerInfo[playerid][pPhoneBook] = 1;
}*/
if(PlayerInfo[playerid][pZivispawn] == 0) // Los Santos
{
SetPlayerPos(playerid, 381.8524,-1828.7184,7.8359); // LS SPAWN
SetPlayerFacingAngle(playerid,60.3900);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pRollerLic] = 1;
PlayerInfo[playerid][pPhoneBook] = 1;
}
else if(PlayerInfo[playerid][pZivispawn] == 1) // kp
{
SetPlayerPos(playerid,1683.0674,1447.9215,10.7717);
SetPlayerFacingAngle(playerid,358.8067);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pRollerLic] = 1;
PlayerInfo[playerid][pPhoneBook] = 1;
}
else if(PlayerInfo[playerid][pZivispawn] == 2) // kp
{
SetPlayerPos(playerid,1683.0674,1447.9215,10.7717);
SetPlayerFacingAngle(playerid,358.8067);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pRollerLic] = 1;
PlayerInfo[playerid][pPhoneBook] = 1;
}
else
{
rand = random(sizeof(gRandomPlayerSpawns));
SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
SetPlayerFacingAngle(playerid, 180.0); //normal 270.0
SetPlayerInterior(playerid,3); //normal 15
}
return 1;
}
}
if(PlayerInfo[playerid][pJailed] == 1)
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,193.7812,162.1770,1003.0234);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pInt] = 3;
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_LIGHTRED, "Flüchten bringt nichts, zurück in die Zelle!");
return 1;
}
return 1;
}