Hallo,
mein /exit Befehl Teleportiert den Spieler nicht wie er soll zum HausPickup sondern zur Farm (0.0, 0.0, 0.0 Koordinate).
Hier erstmal der Befehl:
ocmd:exit(playerid, params[])
{
new Float:HausX, Float:HausY, Float:HausZ;
if(IsPlayerInRangeOfPoint(playerid, 7.0, 244.4221, 305.0592, 999.1484))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 266.7091, 305.0197, 999.1484))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2324.4587, -1148.8004, 1050.7101))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 235.3885, 1187.0400, 1080.2578))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 225.7580, 1239.9197, 1082.1406))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 223.1530, 1287.4996, 1082.1406))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 225.7527, 1021.9715, 1084.0162))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 295.0053, 1472.9153, 1080.2578))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 328.0984, 1478.0658, 1084.4375))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 386.7174, 1471.7593, 1080.1875))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2269.7668, -1210.4520, 1047.5625))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 2365.2903, -1135.0590, 1050.8750))
{
HausX = HausInfo[GetPlayerVirtualWorld(playerid)][hX];
HausY = HausInfo[GetPlayerVirtualWorld(playerid)][hY];
HausZ = HausInfo[GetPlayerVirtualWorld(playerid)][hZ];
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, HausX, HausY, HausZ);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
return 1;
}
Seltsam ist das die Coordinaten in den Variablen HausInfo[GetPlayerVirtualWorld(playerid)][hX/hY/hZ] stimmen, zumindest werden sie bei einem printf richtig ausgegeben.
Jemand eine Idee?