GrubaS

[HELP]block vehicle.txd

Recommended Posts

Hello, i have a question it's possible to block a file "GTA - San Andreas\models\generic\vehicle.txd"  ? i want make it to always orginal in my own server.

Share this post


Link to post

There is a function that blocks players from joining your server if they got a modded gta which I could not find but it is somewhere in the wiki.

Or use engineRestoreModel(id) but I am not sure if that restores to the GTA original model or default model (default can be modified but it is still a default since it is included in your GTA)

Share this post


Link to post

you can edit it from <allow_gta3_img_mods>none</allow_gta3_img_mods>  in ur mtaserver.conf file. [only if u wanna prevent players who are using mods to join.]

 

or if u wanna restore it then use engineRestoreModel(id) like what @SuperCroz said.

Edited by DonOmar
fix

Share this post


Link to post

i tried that and it doesn't works " <allow_gta3_img_mods>none</allow_gta3_img_mods> " it's only blocking all vehicles from gta3.img i want block GTA - San Andreas\models\generic\vehicle.txd
same with engineRestoreModel(id)

Edited by GrubaS

Share this post


Link to post

Hello, i already made protect for that but "xvehicleenv128" doensn't work can u tell me why? :/

Client.lua

texShader1 = dxCreateShader ( "files/vehicle.fx" )
vehicledash32 = dxCreateTexture("files/vehicledash32.png")
dxSetShaderValue(texShader1,"gTexture",vehicledash32)
engineApplyShaderToWorldTexture(texShader1,"vehicledash32")

texShader2 = dxCreateShader ( "files/vehicle.fx" )
vehiclegeneric256 = dxCreateTexture("files/vehiclegeneric256.png")
dxSetShaderValue(texShader2,"gTexture",vehiclegeneric256)
engineApplyShaderToWorldTexture(texShader2,"vehiclegeneric256")

texShader3 = dxCreateShader ( "files/vehicle.fx" )
vehiclegrunge256 = dxCreateTexture("files/vehiclegrunge256.png")
dxSetShaderValue(texShader3,"gTexture",vehiclegrunge256)
engineApplyShaderToWorldTexture(texShader3,"vehiclegrunge256")

texShader4 = dxCreateShader ( "files/vehicle.fx" )
vehiclelights128 = dxCreateTexture("files/vehiclelights128.png")
vehiclelightson128 = dxCreateTexture("files/vehiclelightson128.png")
dxSetShaderValue(texShader4,"gTexture",vehiclelights128)
engineApplyShaderToWorldTexture(texShader4,"vehiclelights128")
dxSetShaderValue(texShader4,"gTexture",vehiclelightson128)
engineApplyShaderToWorldTexture(texShader4,"vehiclelightson128")

texShader5 = dxCreateShader ( "files/vehicle.fx" )
plateback3 = dxCreateTexture("files/plateback.png")
dxSetShaderValue(texShader5,"gTexture",plateback3)
engineApplyShaderToWorldTexture(texShader5,"plateback1")
engineApplyShaderToWorldTexture(texShader5,"plateback2")
engineApplyShaderToWorldTexture(texShader5,"plateback3")

texShader6 = dxCreateShader ( "files/vehicle.fx" )
vehiclespecdot64 = dxCreateTexture("files/vehiclespecdot64.png")
dxSetShaderValue(texShader6,"gTexture",vehiclespecdot64)
engineApplyShaderToWorldTexture(texShader6,"vehiclespecdot64")

texShader7 = dxCreateShader ( "files/vehicle.fx" )
vehiclesteering128 = dxCreateTexture("files/vehiclesteering128.png")
dxSetShaderValue(texShader7,"gTexture",vehiclesteering128)
engineApplyShaderToWorldTexture(texShader7,"vehiclesteering128")

texShader8 = dxCreateShader ( "files/vehicle.fx" )
vehicletyres128 = dxCreateTexture("files/vehicletyres128.png")
dxSetShaderValue(texShader8,"gTexture",vehicletyres128)
engineApplyShaderToWorldTexture(texShader8,"vehicletyres128")

texShader9 = dxCreateShader ( "files/vehicle.fx" )
vehicleshatter128 = dxCreateTexture("files/vehicleshatter128.png")
dxSetShaderValue(texShader9,"gTexture",vehicleshatter128)
engineApplyShaderToWorldTexture(texShader9,"vehicleshatter128")

texShader10 = dxCreateShader ( "files/vehicle.fx" )
xvehicleenv128 = dxCreateTexture("files/xvehicleenv128.png")
dxSetShaderValue(texShader10,"gTexture",xvehicleenv128)
engineApplyShaderToWorldTexture(texShader10,"xvehicleenv128")

texShader11 = dxCreateShader ( "files/vehicle.fx" )
vehiclescratch64 = dxCreateTexture("files/vehiclescratch64.png")
dxSetShaderValue(texShader11,"gTexture",vehiclescratch64)
engineApplyShaderToWorldTexture(texShader11,"vehiclescratch64")

texShader12 = dxCreateShader ( "files/vehicle.fx" )
vehicleenvmap128 = dxCreateTexture("files/vehicleenvmap128.png")
dxSetShaderValue(texShader12,"gTexture",vehicleenvmap128)
engineApplyShaderToWorldTexture(texShader12,"vehicleenvmap128")

texShader13 = dxCreateShader ( "files/vehicle.fx" )
platecharset = dxCreateTexture("files/platecharset.png")
dxSetShaderValue(texShader13,"gTexture",platecharset)
engineApplyShaderToWorldTexture(texShader13,"platecharset")

Only this doesn't work
 

texShader10 = dxCreateShader ( "files/vehicle.fx" )
xvehicleenv128 = dxCreateTexture("files/xvehicleenv128.png")
dxSetShaderValue(texShader10,"gTexture",xvehicleenv128)
engineApplyShaderToWorldTexture(texShader10,"xvehicleenv128")

it's vehicle.fx
 

// Nothing Here!!
texture gTexture;

// Vehicle default txd technique
technique TexReplace
{
	pass P0
	{
		// Setting texture
		Texture[0] = gTexture;

		
		
	}
}

it's meta.xml
 

<meta>
	<info author="Zayn" version="1.0" type="script" name="Default Vehicle TXD" description="Sets default vehicle.txd for every player" />
	
	<script src="c.lua" type="client" />
	
	<file src="files/vehicle.fx"/>
	<file src="files/vehiclelights128.png"/>
	<file src="files/vehiclelightson128.png"/>
	<file src="files/vehicledash32.png"/>
	<file src="files/vehiclegeneric256.png"/>
	<file src="files/vehicleshatter128.png"/>
	<file src="files/vehiclespecdot64.png"/>
	<file src="files/vehiclesteering128.png"/>
	<file src="files/vehicletyres128.png"/>
	<file src="files/vehiclegrunge256.png"/>
	<file src="files/plateback.png"/>	
	<file src="files/xvehicleenv128.png"/>	
	<file src="files/vehiclescratch64.png"/>	
	<file src="files/vehicleenvmap128.png"/>	
	<file src="files/platecharset.png"/>	
</meta>

 

Share this post


Link to post

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

  • Recently Browsing   0 members

    No registered users viewing this page.