hey im trying to make a trigger that turns gravity off with lua. I cant get it to work. so far I have
function GravityOff(e)
end
function spawnwhenclose_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 300 and g_PlayerHealth > 0 then
function GravityOff(e)
SendMessageI("setnogravity",e,1);
end
end
end
but i get an arror on startup saying: no fuction called GravityOff main
any help is welcome! thanks.