Help me to disable the Default trainer Natives?


#1

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)

#2
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.


#3

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


#4

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


#5

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


#6

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


#7

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)

#8

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


#9

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


#10

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)

#11

unaffective still dont work


#12

No the argument still has to be in ( ).


#13

so (false) or (‘false’)


#14

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


#15

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)

#16

Is this script run on the client-side?


#17

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


#18

SET_PLAYER_INVISIBLE_LOCALLY needs to be SetPlayerInvisibleLocally.

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


#19

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


#20

Have you try

DisplayRadar(0)

btw in boolean 0=false and true=1