Hey Com,
Ich habe gescriptet das wenn man ein haus besitzt das man davor spawnt?
Jedoch wenn ich jetzt kein haus besitzte dann Falle ich durch den Himmel`?
Hier der Code
{
SetPlayerToTeamColor(playerid);
if(PlayerInfo[playerid][pOrigin] == 1 || PlayerInfo[playerid][pOrigin] == 2 || PlayerInfo[playerid][pOrigin] == 3)
{
new i = PlayerInfo[playerid][pHouseKey];
if(PlayerInfo[playerid][pHouseKey] != 255)
{
SetPlayerPos(playerid,HouseInfo[i][hEntrx], HouseInfo[i][hEntry], HouseInfo[i][hEntrz]);//Hier ist die Haus posi
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pRollerLic] = 1;
PlayerInfo[playerid][pPhoneBook] = 1;
return 1;
}
else
{
SetPlayerPos(playerid,1715.2151,-1912.7118,13.5665);
SetPlayerFacingAngle(playerid,358.8067);
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pRollerLic] = 1;
PlayerInfo[playerid][pPhoneBook] = 1;
return 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
PlayerInfo[playerid][pInt] = 3; //normal 15
}