Hey,
So I am trying to make it that only if you are Invisible (alias vanished) and Flying (alias Noclip) that the "Radar" is showing.
Which I made it work.
Now the only thing is that after you used the "/radar" command you can just get out of the Noclip and Vanish mode and its still updating --> every tick.
So the only thing which is missing is that every tick it should check again if the player is still in both modes.
If not "destroy".
This is my code so far:
So I am trying to make it that only if you are Invisible (alias vanished) and Flying (alias Noclip) that the "Radar" is showing.
Which I made it work.
Now the only thing is that after you used the "/radar" command you can just get out of the Noclip and Vanish mode and its still updating --> every tick.
So the only thing which is missing is that every tick it should check again if the player is still in both modes.
If not "destroy".
This is my code so far:
if (!player.IsFlying)
{
player.ChatMessage(msg("You can only use the Radar command if you are in <color=cyan>Noclip</color> mode! Dont even try it <color=red>" + player.displayName + "</color>", player.UserIDString));
Destroy(this);
return;
}
var IsNotVisible = ins.Vanish != null && permission.UserHasPermission(player.UserIDString, "vanish.use") && (bool)ins.Vanish.Call("IsInvisible", player);
if (!IsNotVisible)
{
player.ChatMessage(msg("You can only use the Radar command if you are in <color=cyan>Vanish</color> mode! Dont even try it <color=red>" + player.displayName + "</color>", player.UserIDString));
Destroy(this);
return;
}If I put this into the update function I get the following error:
"Error while compiling: AdminRadar.cs(531,44): error CS0038: Cannot access a nonstatic member of outer type `Oxide.Plugins.AdminRadar' via nested type `Oxide.Plugins.AdminRadar.Radar'"
Can someone help me with that?
Regards
SkillerFreak