Try:
if (Airstrike != null && Airstrike.Call<bool>("isStrikePlane", plane))
You may want to make sure Airstrike is not null too, so I'd check for that.
Thanks for the suggestion, it's unfortunately still always returning false.
I'm using this for the sake of testing:
void OnServerInitialized()
{
if (Airstrike != null)
Puts("Plugin Airstrike found.");
}
void OnAirdrop(CargoPlane plane)
{
bool isAirstrike = false;
if (Airstrike != null && Airstrike.Call<bool>("isStrikePlane", plane))
isAirstrike = true;
Puts(isAirstrike.ToString());
}
Which always outputs:
[GUIAnnouncements] Plugin Airstrike found.
[GUIAnnouncements] False
I'm running the command "airstrike strike random" from console to spawn an airstrike plane.
Then using "entity.spawn cargo_plane" to check normal planes are false.
Merged post I'm still struggling with this, are you able to assist please?