Hallo liebe Leute,
nun habe ich ein paar Tage nichts mehr an meinem Script gemacht und habe nun das Problem das ich keines meiner Gebäude mehr betreten kann.
Die koordinaten wo ich betreten will sind Richtig !!!
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_SECONDARY_ATTACK) //HAUS EINGANG
{
for(new i=0; i<sizeof(hInfo); i++)
{
if(!hInfo[i][h_id])continue;
if(hInfo[i][ih_x]==0.0)continue;
if(!IsPlayerInRangeOfPoint(playerid,5,hInfo[i][h_x],hInfo[i][h_y],hInfo[i][h_z]))continue;
SetPlayerPos(playerid,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]);
SetPlayerInterior(playerid,hInfo[i][h_interior]);
SetPlayerVirtualWorld(playerid,i);
}
return 1;
}
if(newkeys & KEY_SECONDARY_ATTACK) //HAUS Ausgang
{
for(new i=0; i<sizeof(hInfo); i++)
{
if(GetPlayerVirtualWorld(playerid)!=i)continue;
if(!IsPlayerInRangeOfPoint(playerid,20,hInfo[i][ih_x],hInfo[i][ih_y],hInfo[i][ih_z]))continue;
SetPlayerPos(playerid, hInfo[i][h_x], hInfo[i][h_y], hInfo[i][h_z]);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
return 1;
}
}
if(newkeys & KEY_SECONDARY_ATTACK) //LSPD Haupteingang betreten
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1554.4691,-1675.4144,16.1953))
{
SetPlayerPos(playerid,246.7169,65.3257,1003.6406);
SetPlayerInterior(playerid,6);
SendClientMessage(playerid,COLOR_GREEN,"Sie haben das Gebäude betreten.");
}
}
if (newkeys & KEY_SECONDARY_ATTACK) //LSPD Hauptausgang verlassen
{
if(IsPlayerInRangeOfPoint(playerid,5.0,246.9134,63.5777,1003.6406))
{
SetPlayerPos(playerid,1552.2690,-1675.3098,16.1953);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_GREEN,"Sie haben das Gebäude verlassen.");
SetTimerEx("EingangTimer",1000,0,"i",playerid);
}
}
if (newkeys & KEY_SECONDARY_ATTACK)//LSPD Garage Ausgang
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1524.4877,-1677.0833,6.2188))
{
SetPlayerPos(playerid,246.5958,87.8413,1003.6406);
SetPlayerInterior(playerid,6);
SendClientMessage(playerid,COLOR_GREEN,"Sie haben das Gebäude verlassen.");
SetTimerEx("EingangTimer",1000,0,"i",playerid);
}
}
if (newkeys & KEY_SECONDARY_ATTACK) //LSPD Garage Eingang
{
if(IsPlayerInRangeOfPoint(playerid,5.0,246.5958,87.8413,1003.6406))
{
SetPlayerPos(playerid,1524.4877,-1677.0833,6.2188);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_GREEN,"Sie haben das Gebäude betreten.");
SetTimerEx("EingangTimer",1000,0,"i",playerid);
}
}
if (newkeys & KEY_SECONDARY_ATTACK) //Stadthalle Eingang
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1480.6678,-1770.9159,18.7958))
{
SetPlayerPos(playerid,384.808624,173.804992,1008.382812);
SetPlayerInterior(playerid,3);
SendClientMessage(playerid,COLOR_GREEN,"Sie haben das Gebäude betreten.");
SetTimerEx("EingangTimer",1000,0,"i",playerid);
}
}
if (newkeys & KEY_SECONDARY_ATTACK) //Stadthalle Ausgang
{
if(IsPlayerInRangeOfPoint(playerid,5.0,389.8269,174.0015,1008.3828))
{
SetPlayerPos(playerid,1480.6678,-1770.9159,18.7958);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,COLOR_GREEN,"Sie haben das Gebäude betreten.");
SetTimerEx("EingangTimer",1000,0,"i",playerid);
}
}
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,1494.1659,-1771.1053,18.7958) || IsPlayerInRangeOfPoint(playerid, 2.0, 1811.6915,-1881.2222,13.5704) || IsPlayerInRangeOfPoint(playerid, 2.0, 548.8316,-1259.5533,16.8543) || IsPlayerInRangeOfPoint(playerid, 2.0, 1484.70, -1772.32, 18.23) || IsPlayerInRangeOfPoint(playerid, 2.0, 1425.8143,-1023.0555,23.8281) || IsPlayerInRangeOfPoint(playerid, 2.0,733.2467,-1348.6964,13.5092))
{
ShowPlayerDialog(playerid, DIALOG_Bank, DIALOG_STYLE_LIST,"Menü", "Kontostand\nEinzahlen\nAuszahlen", "Auswählen", "Beenden");
}
}
if(newkeys & KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0,1494.1659,-1771.1053,18.7958) || IsPlayerInRangeOfPoint(playerid, 2.0, 1811.6915,-1881.2222,13.5704) || IsPlayerInRangeOfPoint(playerid, 2.0, 548.8316,-1259.5533,16.8543) || IsPlayerInRangeOfPoint(playerid, 2.0, 1484.70, -1772.32, 18.23) || IsPlayerInRangeOfPoint(playerid, 2.0, 1425.8143,-1023.0555,23.8281) || IsPlayerInRangeOfPoint(playerid, 2.0,733.2467,-1348.6964,13.5092))
{
ShowPlayerDialog(playerid, DIALOG_Bank, DIALOG_STYLE_LIST,"Menü", "Kontostand\nEinzahlen\nAuszahlen", "Auswählen", "Beenden");
}
}
if(newkeys & KEY_NO)
{
if(PlayerInfo[playerid][pJob] != 4) return 1;
if(Garbage2[playerid][Mullaktiv] == false) return 1;
for(new r = 0; r < sizeof(Muelltonnen); r++)
{
for(new i = 0; i < sizeof(Muelltonnen[]); i++)
{
if(IsPlayerInRangeOfPoint(playerid,3,Muelltonnen[r][i][mt_x],Muelltonnen[r][i][mt_y],Muelltonnen[r][i][mt_z]))
{
if(r != Garbage2[playerid][MullmannRoute]) return SendClientMessage(playerid,COLOR_RED,"Das ist keine Mülltonne aus deiner Route.");
if(i != Garbage2[playerid][Mulltonne]) return 1;
AttachObjectToPlayer(Muelltonnen[r][i][MuelltonnenID], playerid, 0, 0.65, 0-0.35, 0, 0, 0-180);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
Muelltonnen[r][i][mt_used] = true;
new Float:vX, Float:vY, Float:vZ,Float:vA;
GetXYInFrontOfVehicle(Garbage2[playerid][MullwagenID], vX, vY, vZ, vA, -4.2);
SetPlayerCheckpoint(playerid, vX, vY, vZ+0.5, 3);
Garbage2[playerid][MullmannStep] = 1;
}
}
}
}
return 1;
}