Version 1.0.4

This commit is contained in:
bmgjet 2021-08-01 17:35:29 +12:00 committed by GitHub
parent efbfcf6ab0
commit 99a145cd12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -290,7 +290,9 @@ namespace Oxide.Plugins
public void CargoPoints(BasePlayer player, Vector3 location)
{
int node = CargoBlockPoint.Keys.Last() + 1;
int node = 0;
try { node = CargoBlockPoint.Keys.Last() + 1; }
catch { }
CargoBlockPoint.Add(node, location);
message(player, "added", node);
}
@ -298,6 +300,10 @@ namespace Oxide.Plugins
public bool BlockE(Vector3 currentlocation)
{
//checks each point to see if cargo is within area.
if (CargoBlockPoint == null)
{
return false;
}
foreach (KeyValuePair<int, Vector3> blockpoints in CargoBlockPoint)
{
if (Vector3.Distance(currentlocation, blockpoints.Value) < config.LeaveBlockDistance)