if(LagerPlatz[playerid]==1&& IsPlayerInRangeOfPoint(playerid,3.0,2160.4749,-2299.6975,13.5166))
{
if(!IsObjectInRangeOfPoint(objectid,3.0,x,y,z))return SCM(playerid,-1,"Das Object nicht mitgenommen?");
LagerPlatz[playerid]=0;
SendClientMessage(playerid,HELLBLAU,"Du hast die Ware erfolgreich eingelagert.");
Lageraufgabe(playerid);
}
//quelle forum.samp.com
stock IsObjectInRangeOfPoint(objectid,Float:radi, Float:x, Float:y, Float:z)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetObjectPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
return 0;
}