/enter
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
}
}
}
/exit
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
//printf("House :%d",i);
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
}
}
if(strcmp(cmd, "/open", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(PlayerInfo[playerid][pPhousekey] == i)
{
if(HouseInfo[i][hLock] == 1)
{
HouseInfo[i][hLock] = 0;
GameTextForPlayer(playerid, "~w~Door ~g~Unlocked", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
if(HouseInfo[i][hLock] == 0)
{
HouseInfo[i][hLock] = 1;
GameTextForPlayer(playerid, "~w~Door ~r~Locked", 5000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
return 1;
}
}
else
{
GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
return 1;
}
}
}
/exit vom neuen erstellen Haus
else if (PlayerToPoint(3.0, playerid,221.600006,1143.599975,1082.599975) && GetPlayerVirtualWorld(playerid) == 10)//Haus 35, Innen Koordianten und dann Virtuele Welt
{
SetPlayerInterior(playerid,0);//Interior
SetPlayerPos(playerid,2393.169921,-1646.660034,13.640000);//enter Koordinaten
PlayerInfo[playerid][pInt] = 0;//Interior
SetPlayerVirtualWorld(playerid,0);//Virtuelle Welt
}
/enter vom neuen erstellen Haus
else if (PlayerToPoint(3.0, playerid,2393.169921,-1646.660034,13.640000))//Haus 35, WO das man /enter macht
{
if(PlayerToPoint(3.0, playerid,2393.169921,-1646.660034,13.640000))//Wo man /enter macht
{
SetPlayerPos(playerid,221.600006,1143.599975,1082.599975);//Interior ID (Innen Koordianten)
SetPlayerInterior(playerid,4);//Interior
PlayerInfo[playerid][pInt] = 4;//interior
SetPlayerVirtualWorld(playerid, 10);//Virtuele Welt
}
else
{
SetPlayerVirtualWorld(playerid, 10);//Virtuele Welt
}
}
Ich bezweifle das mir jemand helfen kann weil mir schon mittlerweile 15 Scripter versucht haben zu helfen keine chance keiner hat es bis jetzt geschafft aber naja hab trotzdem mal das nötigste gepostet vll gibs ja eine kleine Hoffnung