Skip to content
This repository has been archived by the owner on Jul 18, 2018. It is now read-only.

Multiple ped and vehicle issues #14

Open
LemonHaze420 opened this issue Mar 23, 2018 · 1 comment
Open

Multiple ped and vehicle issues #14

LemonHaze420 opened this issue Mar 23, 2018 · 1 comment

Comments

@LemonHaze420
Copy link
Collaborator

LemonHaze420 commented Mar 23, 2018

Using the below gamemode server script, many issues can be encountered.

As there are multiple issues encountered here, a video has been provided here.

function onServerStart()
	print("Default Gamemode Started")

	local modelID = 226
	
	AddVehicle(modelID, 538.117798, 626.908203, 10.901563)
	AddPed(7, 532.501892, 636.292664, 11.043379)
	
	local vehID 					= AddVehicle(modelID, 530.393555, 618.161865, 10.901563, 2, 6)
	local PosX,PosY,PosZ 			= GetEntityPos(vehID)
	local entType 					= GetEntityType(vehID)
	print("Vehicle ID#"..vehID.." PosX: ".. PosX .. " PosY: " .. PosY .. " PosZ: " .. PosZ)
end

The above script stores the vehicle model ID 226 into a local variable when the server starts and calls the onServerStart callback. Once this value is assigned, the script then adds two vehicles and a single pedestrian to the game world and prints out some basic debugging info.

As seen in the video, one of the vehicles' audio is completely missing, despite another vehicle of the same model ID having the audio functioning as intended.

Furthermore, the vehicle seems to be unable to be destroyed and upon attempting to destroy the 'working' vehicle, the client crashed:

0x004C8556 (Access violation reading location 0x44082C33)(gta-vc.exe)
[22:02:20][VC CO-OP] Trying to damage component 16 of blistac
[22:02:20][VC CO-OP] Trying to damage component 12 of blistac
[22:02:21][VC CO-OP]Exception C0000005 occurred at address 004C8556

If a fix is found for all of the above issues, please close this issue. However, in the event that only a single or few fixes are found for some of the above issues, please comment on this issue with the relevant commit hash, so this can be recorded and traced back in the future.

@LemonHaze420
Copy link
Collaborator Author

81c8b3c implements a function which allows server-owners to retrieve random vehicle color IDs, which when used with the above script, seems to have fixed the audio issue.

Example:

	local modelID = 226
	local randColorA = GetRandomVehicleColor()
	local randColorB = GetRandomVehicleColor()
	
	AddVehicle(modelID, 538.117798, 626.908203, 10.901563, randColorA, randColorB)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant