How to export Rain and Weather info from ASI to shader in GTA 5?
Posted: 08 Mar 2024, 21:55
So, i'm trying to create an ASI plugin that allows to export live game info to shaders for GTA 5. I know that ENB already has those, but as i said, i'm trying to learn it. I came up with this but it doesn't works.
float Rain = 0.0;
void RainData()
{
int RainValue = GAMEPLAY::GET_RAIN_LEVEL();
if (RainValue > 0.0)
{
Rain = 1.0;
}
else
{
Rain = 0.0;
}
}
void main()
{
while (true)
{
RainData();
WAIT(0);
}
}
void ScriptMain()
{
srand(GetTickCount());
main();
}
And i really don't know how to proceed from there .
float Rain = 0.0;
void RainData()
{
int RainValue = GAMEPLAY::GET_RAIN_LEVEL();
if (RainValue > 0.0)
{
Rain = 1.0;
}
else
{
Rain = 0.0;
}
}
void main()
{
while (true)
{
RainData();
WAIT(0);
}
}
void ScriptMain()
{
srand(GetTickCount());
main();
}
And i really don't know how to proceed from there .