Hi Mein Spawnchange Funktioniert nur bei Spawnchange Fraktion/base der Zivispawn und wen man im Haus Spawnen will spawnt man an der Farm wo ist der Fehler ?
Danke Schonmal im Vorraus für die Unterstützung
CMD:spawnchange(playerid, params[])
{
SendClientMessage(playerid,COLOR_YELLOW,"Wo möchtest du beim nästen Login spawnen bitte Suche dir etwas aus");
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid,DIALOG_SPAWNCHANGE, DIALOG_STYLE_LIST, "Spawn Wechseln", "{FF0008}Spawn 1:{FFFBFF}Zivispawn\n{FF0008}Spawn 2:{FFFBFF}Fraktion Basis\n{FF0008}Spawn 3:{FFFBFF}Haus", "Auswählen", "Abbrechen");
}
return 1;
}
case DIALOG_SPAWNCHANGE:
{
if(response)
{
if(listitem == 0)
{
Spieler[playerid][pSpawnChange] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Du Spawnst nun nach jedem Login am Zivispawn");
SavePlayer(playerid);
}
if(listitem == 1)
{
Spieler[playerid][pSpawnChange] = 2;
SendClientMessage(playerid, COLOR_WHITE, "Du spawnst nun nach jedem Login in / an deiner Fraktion Base!");
SavePlayer(playerid);
}
if(listitem == 2)
{
Spieler[playerid][pSpawnChange] = 3;
SendClientMessage(playerid, COLOR_WHITE, "Du spawnst nun nach jedem Login in deinem Haus");
SavePlayer(playerid);
}
}
****************/
switch(Spieler[playerid][pFraktion])
{
case 0: // Zivilist
{
if(Spieler[playerid][pSpawnChange] == 1)
{
SetPlayerSkin(playerid, Spieler[playerid][pSkin]);
SetPlayerPos(playerid, 1778.7421,-1636.0483,14.4822);
SetPlayerFacingAngle(playerid, 86.8790);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
}
}
case 1: // LSPD
{
if(Spieler[playerid][pSpawnChange] == 2)
{
SetPlayerPos(playerid, 258.3255,82.8243,1002.4453);
SetPlayerFacingAngle(playerid, 1.1205);
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, 0);
}
}
case 2: // LCN
{
if(Spieler[playerid][pSpawnChange] == 2)
{
SetPlayerSkin(playerid, Spieler[playerid][pFrakSkin]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, -50.3720,-276.8064,5.4297);
SetPlayerFacingAngle(playerid, 180.1871);
}
}
case 3: // SAMD
{
if(Spieler[playerid][pSpawnChange] == 2)
{
SetPlayerSkin(playerid, Spieler[playerid][pFrakSkin]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1176.7510,-1324.1151,14.0368);
SetPlayerFacingAngle(playerid, 269.5287);
}
}
case 4: // GSF
{
if(Spieler[playerid][pSpawnChange] == 2)
{
SetPlayerSkin(playerid, Spieler[playerid][pFrakSkin]);
SetPlayerInterior(playerid, 8);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 2807.5308,-1174.7401,1025.5703);
SetPlayerFacingAngle(playerid, 357.4926);
}
}
case 5: // Ordnungsamt
{
if(Spieler[playerid][pSpawnChange] == 2)
{
SetPlayerSkin(playerid, Spieler[playerid][pFrakSkin]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 924.2922,-1243.4111,15.6463);
SetPlayerFacingAngle(playerid, 91.8761);
}
}
}
if(Spieler[playerid][pSpawnChange] == 3)
{
for(new i = 0;i<_cache_haus;i++)
{
if(!strcmp(Haus[i][hOwned],spielername(playerid)))
{
SetPlayerPos(playerid, Haus[i][EnterX], Haus[i][EnterY], Haus[i][EnterZ]);
break;
}
}
}
return 1;
}
enum e_Haus
{
hCreated,
Float:EnterX,
Float:EnterY,
Float:EnterZ,
Float:ExitX,
Float:ExitY,
Float:ExitZ,
hBesitzer[MAX_PLAYER_NAME],
hOwned,
hName[32],
hPreis,
hMieten,
Text3D:hText,
hPickup,
hLock,
hMietPreis,
hInterior,
hKasse,
hdbID,
hHealthUpgrade,
hArmorUpgrade
}
new Haus[MAX_HOUSES][e_Haus];