Jump to content

[V] Script/Native Documentation and Research


Recommended Posts

 

Cool , put it in DB !

 

UI::SET_BLIP_ALPHA(Blip blip, int alpha).

Sets alpha-channel for blip color.

 

 

Hi Alex, forgive my stupidness but i can't find how to add to DB.

 

Also can you have a look at this topic please, we need some black magic from guru.

Alexander Blade

Navigate to desired native and press pencil icon on the left .

 

 

 

Cool , put it in DB !

 

UI::SET_BLIP_ALPHA(Blip blip, int alpha).

Sets alpha-channel for blip color.

 

 

Hi Alex, forgive my stupidness but i can't find how to add to DB.

 

Also can you have a look at this topic please, we need some black magic from guru.

 

Alexander Blade

You can try setting density to 0

 

Nobody know a way to stop system streaming peds and vehicles?

 

You can try setting density to 0

 

Nobody know a way to stop system streaming peds and vehicles?

 

 

This only decrease number of peds and vehicle, I want to delete forever peds and vehicles, I want just me and the default objects.

Alexander Blade

You can try using pools for this , however you will need to check if the entity u r trying to delete isn't a mission one because it can be used by original scripts .

You can try using pools for this , however you will need to check if the entity u r trying to delete isn't a mission one because it can be used by original scripts .

void RPV_thread() {	Ped peds[1024];	int count = worldGetAllPeds(peds, 1024);	for (int i = 0; i < count; i++)	{		if (peds[i] != PLAYER::PLAYER_PED_ID())		{			ENTITY::DELETE_ENTITY(&peds[i]);		}	}}void main(){		while (true) {		if (IsKeyJustUp(VK_F4)) {			AUDIO::PLAY_SOUND_FRONTEND(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);			RPV_thread();		}		WAIT(0);	}}

tried with PED::DELETE_PED too, doesn't work.

here is my topic with what I tried.

http://gtaforums.com/topic/821891-removing-peds-and-vehicles/

Alexander Blade

You need to check if an entity you are trying to delete is not a mission one , also to delete world entity you need to set it as mission entity , see sdk readme .

Edited by Alexander Blade
void main(){		while (true) {		if (IsKeyJustUp(VK_F4)) {			AUDIO::PLAY_SOUND_FRONTEND(-1, "NAV_UP_DOWN", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);			STREAMING::SET_VEHICLE_POPULATION_BUDGET(false);			VEHICLE::SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(0.0);			const int ARR_SIZE = 1024;			Vehicle vehicles[ARR_SIZE];			int count = worldGetAllVehicles(vehicles, ARR_SIZE);			for (int i = 0; i < count; i++)			{				if (!ENTITY::IS_ENTITY_A_MISSION_ENTITY(vehicles[i]))					ENTITY::SET_ENTITY_AS_MISSION_ENTITY(vehicles[i], TRUE, TRUE);				VEHICLE::DELETE_VEHICLE(&vehicles[i]);			}		}		WAIT(0);	}}

still doesn't work and I did how you said, or I need to attach to event tick?

And if yes, how I do ?

Alexander Blade

Works like this

void main(){	while (true)	{		const int ARR_SIZE = 1024;		Vehicle vehicles[ARR_SIZE];		int count = worldGetAllVehicles(vehicles, ARR_SIZE);		for (int i = 0; i < count; i++)		{			if (ENTITY::IS_ENTITY_A_MISSION_ENTITY(vehicles[i])) // you must not delete mission entities , other scripts may use it !				continue;			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(vehicles[i], TRUE, TRUE);			VEHICLE::DELETE_VEHICLE(&vehicles[i]);		}		WAIT(0);	}}

 

Works like this

void main(){	while (true)	{		const int ARR_SIZE = 1024;		Vehicle vehicles[ARR_SIZE];		int count = worldGetAllVehicles(vehicles, ARR_SIZE);		for (int i = 0; i < count; i++)		{			if (ENTITY::IS_ENTITY_A_MISSION_ENTITY(vehicles[i])) // you must not delete mission entities , other scripts may use it !				continue;			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(vehicles[i], TRUE, TRUE);			VEHICLE::DELETE_VEHICLE(&vehicles[i]);		}		WAIT(0);	}}

 

Thanks! scriptRegister is the only way to create a thread? I tried with CreateThread but GTA 5 crashed.

Alexander Blade

scriptRegister and only in the dll main , if you want additional threads then call scriptRegisterAdditionalThread after scriptRegister

Edited by Alexander Blade
  • 2 weeks later...
So there was this line in natives.h who was giving error in visual basic



static BOOL CAN_PED_IN_COMBAT_SEE_TARGET(Ped target, Ped target) { return invoke<BOOL>(0xEAD42DE3610D0721, target, target); } // 0xEAD42DE3610D0721 0xCCD525E1



I changed it to:




static BOOL CAN_PED_IN_COMBAT_SEE_TARGET(Ped target, Ped Ped) { return invoke<BOOL>(0xEAD42DE3610D0721, target, target); } // 0xEAD42DE3610D0721 0xCCD525E1



And stopped giving error. The thing is, I do not have a clue if I actually did something right, do not know anything about c ++

Edited by Kilowog01
InfamousSabre

So there was this line in natives.h who was giving error in visual basic

 

static BOOL CAN_PED_IN_COMBAT_SEE_TARGET(Ped target, Ped target) { return invoke<BOOL>(0xEAD42DE3610D0721, target, target); } // 0xEAD42DE3610D0721 0xCCD525E1

I changed it to:

 

 

static BOOL CAN_PED_IN_COMBAT_SEE_TARGET(Ped target, Ped Ped) { return invoke<BOOL>(0xEAD42DE3610D0721, target, target); } // 0xEAD42DE3610D0721 0xCCD525E1
And stopped giving error. The thing is, I do not have a clue if I actually did something right, do not know anything about c ++

Change it to this, otherwise it wont work right.

 

 

 

static BOOL CAN_PED_IN_COMBAT_SEE_TARGET(Ped ped, Ped target) { return invoke<BOOL>(0xEAD42DE3610D0721, ped, target); } // 0xEAD42DE3610D0721 0xCCD525E1
Edited by InfamousSabre
  • 2 weeks later...
Alexander Blade

GTA V Native hash translation table from b463 to b505 .

 

http://pastebin.com/tWq938my

No you don't .

 

Hmm what's this then?

---------------------------SCRIPT HOOK V CRITICAL ERROR---------------------------FATAL: Unknown game version, check http://dev-c.com for updateshttp://dev-c.comSupported versions:1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2/4, 1.0.463.1---------------------------OK   ---------------------------

 

No you don't .

 

Hmm what's this then?

---------------------------SCRIPT HOOK V CRITICAL ERROR---------------------------FATAL: Unknown game version, check http://dev-c.com for updateshttp://dev-c.comSupported versions:1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2/4, 1.0.463.1---------------------------OK   ---------------------------

 

PS : I didn't need

Edited by TransmetTeam
Alexander Blade

You should check patch number before calling these , works only for the vehicles of the latest patch .

static void _SET_VEHICLE_INTERIOR_COLOUR(Vehicle vehicle, int color) { invoke<Void>(0xF40DD601A65F7F19, vehicle, color); }static void _GET_VEHICLE_INTERIOR_COLOUR(Vehicle vehicle, int *color) { invoke<Void>(0x7D1464D472D32136, vehicle, color); }static void _SET_VEHICLE_DASHBOARD_COLOUR(Vehicle vehicle, int color) { invoke<Void>(0x6089CDF6A57F326C, vehicle, color); }static void _GET_VEHICLE_DASHBOARD_COLOUR(Vehicle vehicle, int *color) { invoke<Void>(0xB7635E80A5C31BFF, vehicle, color); }

 

Anyone have an idea how the interior and sign neon colour works on the low rider DLC ? Perhaps they introduced a new native(s) ?

 

Edited by Alexander Blade

Alexander,

 

I am unable to use your function : drawTexture

My current code :

int idHAP = createTexture("hap.png");while(true){drawTexture(idHAP, 64, 1, 10, 0.2, 0.2, 0.5, 0.5, xHead, yHead, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0);// xHead and yHead is the value returned by pointer of _WORLD3D_TO_SCREEN2D nativeWAIT(0);}

This code, don't work in-game :blink:

 

I would like an example to understand :santa:

 

"hap.png" is in Grand Theft Auto V directory.

 

Because I do not understand too :

- index

- level

- screenHeightScaleFactor

 

 

Thanks ! :inlove:

Edited by TransmetTeam

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.