Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
It looks like the function code for that would be DealDamageAddToxicSpikesToFoeSide, but I don't know whether the equivalent codes for other hazards are supported by base Essentials or require one of Lucidious09's plugins, or whether the effect you want is supported at all without having to copy...
I've downloaded Pokémon Essentials v21.1, I've unzipped it, and I've tried repeatedly to launch it to try it out, but each time, I just get "No script file has been specified. Check the game's INI and try again." I've looked around in the files a bit, but haven't been able to launch any other...