Help me to disable the Default trainer Natives?

Hi, i am currently trying to disable a few of the natives using the same method as the Weather and NoWantedLevel scripts… I have noticed there is no Now or Persist native calls so would this make it not possible? I have tried it the same way as the Radar but its not set up the same so i added the “OFF” option thinking it would default the trainer to off. Can anyone help? I am confused at why this dont work when the server is issuing the command pretty much to turn off the said natives.

-- Hide miniMap conditions
-- For use Later
-- HideHudAndRadarThisFrame()
Citizen.CreateThread(function()
    while true do
		HideHudAndRadarThisFrame()
		SetExplosiveAmmoThisFrame("OFF")
		SetExplosiveMeleeThisFrame("OFF")
		SetFireAmmoThisFrame("OFF")
		SetPlayerInvincible("OFF")
		SET_PLAYER_INVISIBLE_LOCALLY("OFF")		
		Citizen.Wait(1)
	end
end)
SetExplosiveAmmoThisFrame("OFF")

Isn’t a thing. It would be;

SetExplosiveAmmoThisFrame false

Do note,

HideHudAndRadarThisFrame()

This also disables the weapon wheel as that is also defined as HUD.

1 Like

nothing to just disable the mini map itself then huh?
Also what you posted does not seem to do anything, should this be called client side or server side

I don’t think it’s a toggle, have you looked it up in Nativedb?

Only thing that i can find is DisableRadar and it did nothing, and then there is ToggleStealthRadar which i have no idea what that does i was googling it.

Any idea why your false setting does nothing for me

I currently have

-- Hide miniMap conditions
-- For use Later
Citizen.CreateThread(function()
    while true do
		SetExplosiveAmmoThisFrame('false')
		SetExplosiveMeleeThisFrame('false')
		SetFireAmmoThisFrame('false')
		SetPlayerInvincible('false')
		SET_PLAYER_INVISIBLE_LOCALLY('false')		
		Citizen.Wait(1)
	end
end)

and that doesnt work, doesnt even attempt to take effect

Use NativeDB please.

UI::DISPLAY_RADAR

Hashes: 0xA0EBB943C300E693 0x52816BD4
void DISPLAY_RADAR(BOOL Toggle) // 0xA0EBB943C300E693 0x52816BD4
If Minimap / Radar should be displayed.

So…

Citizen.CreateThread(function()
      while true do
      DisplayRadar (false)
      end
      Citizen.Wait(0)
end)

Also you don’t write booleans in ’ '. It’s just true or false.

1 Like

well the false doesnt work, cant disable features of the trainer that ruin the game for everyone…

think i just got what you where saying thanks

attempting

    while true do
		DisplayRadar false
		SetExplosiveAmmoThisFrame false
		SetExplosiveMeleeThisFrame false
		SetFireAmmoThisFrame false
		SetPlayerInvincible false
		SET_PLAYER_INVISIBLE_LOCALLY false	
	 end
	Citizen.Wait(0)
end)

unaffective still dont work

No the argument still has to be in ( ).

1 Like

so (false) or (‘false’)

It has to be (false). (‘false’) would be a string. You should consider learning the Lua basics before attempting to make scripts.

1 Like

ill try that out thanks alot for your time. Still unable to find the string i really wanted, the Player ID Above Vehicle native. Ive dug around in trainer source codes and cant find it. And i learn on the fly i can read languages just gotta understand why 2 different things don’t work the same. Its a basic disable script like seriously

Citizen.CreateThread(function()
    while true do
		DisplayRadar (false)
		SetExplosiveAmmoThisFrame (false)
		SetExplosiveMeleeThisFrame (false)
		SetFireAmmoThisFrame (false)
		SetPlayerInvincible (false)
		SET_PLAYER_INVISIBLE_LOCALLY (false)	
	 end
	Citizen.Wait(0)
end)

Is this script run on the client-side?

1 Like

yea, thats why i was asking is that correct or not

SET_PLAYER_INVISIBLE_LOCALLY needs to be SetPlayerInvisibleLocally.

Otherwise I don’t see any problems with the syntax.

1 Like

thanks, ill keep trying for sure, loading up test server now

Have you try

DisplayRadar(0)

btw in boolean 0=false and true=1