Commit Graph

12 Commits

Author SHA1 Message Date
Claude
6492a84196 Fix vehicle/skin model loading and remove broken preventDefault
- Request model before spawning vehicles to prevent crashes
- Wait for model to load using hasModelLoaded before createCar
- Request model before changing skins to fix all skins being Niko
- Remove event.preventDefault which is not supported in GTAConnected
- Use destroyMobilePhone native to block phone when menu is open
- Add try/catch around toggle natives for error resilience
2026-01-13 09:49:17 +00:00
Claude
33cbef2eb4 Fix mod menu issues: vehicle spawn, god mode, skins, and phone
- Fix vehicle spawning to use Vec3 for position parameter
- Warp player into spawned vehicle automatically
- Fix skin change to use player index 0 for changePlayerModel
- Fix suicide using explodeCharHead native
- Fix god mode using setCharInvincible native properly
- Fix vehicle god mode using setCarCanBeDamaged native
- Rename "Indestructible" to "God Mode" in vehicle options
- Fix nitro boost using vehicle velocity instead of force
- Add ExecuteTeleportToPlayer handler for network teleport
- Disable phone when menu is open using setPlayerControlForTextChat
- Block UP arrow from triggering phone while menu is open
2026-01-13 09:42:47 +00:00
Claude
3443ed5a17 Fix vehicle spawning and reduce notification duration
- Use natives.createCar(hash, x, y, z, true) for vehicle spawning
- Add vehicleHashes map with correct GTA IV model hashes
- Reduce notification duration from 3000ms to 1000ms
- Quick fade starting at 700ms for snappier UI
2026-01-13 09:29:14 +00:00
Claude
97efbf6a8e Rewrite modmenu to use client-side natives for all actions
Server-side:
- Remove all spawn checks and spawn code
- Relay actions to clients via network events

Client-side:
- Add handlers that execute actions using GTA IV natives
- natives.forceWeatherNow(id) for weather
- natives.forceTimeOfDay(hour, min) for time
- natives.giveWeaponToChar for weapons
- natives.fixCar, natives.changeCarColour for vehicles
- Direct localPlayer property access for health/armor/position
2026-01-13 04:07:10 +00:00
Claude
e14706c0e6 Simplify server: only modmenu resource with auto-spawn
- Remove other resources from server.xml (freeroam, admin, etc.)
- Add auto-spawn on player join in modmenu server.js
- Players now spawn automatically at random location when joining
2026-01-13 03:57:35 +00:00
Claude
fb7640e5de Fix font creation: use correct createDefaultFont signature
- lucasFont.createDefaultFont(size, family, style) - style is string not bool
- Changed from (16.0, "Tahoma", false, false) to (16.0, "Arial", "Regular")
- Added fallback to try Tahoma if Arial fails
2026-01-13 03:52:37 +00:00
Claude
889c3e56e5 Fix mod menu: control locking and use default font
- Fix control locking: gui.showCursor(false, true) re-enables controls on close
- Use lucasFont.createDefaultFont instead of loading external TTF file
- Use graphics.drawRectangle with pixel coordinates for menu boxes
- Use toColour() for color integers
- Menu positioned at right side of screen (x=1050)
2026-01-13 03:45:07 +00:00
Claude
3c68c3a4a4 Rewrite mod menu drawing to use GTA IV natives with Vec2
- Move menu to right side of screen (x=0.73) to avoid chat
- Use normalized coordinates (0-1) for screen positions
- Use natives.drawRect(Vec2 pos, Vec2 size, r, g, b, a)
- Use natives.displayText(Vec2) with addTextComponentString/drawText
- Separate RGBA color components instead of toColour integer
- Fix text rendering with proper native text function sequence
2026-01-12 15:51:25 +00:00
Claude
7bc52ef9d4 Fix client-side drawing API to use Vec2 and graphics API
- Replace natives.drawRect with graphics.drawRectangle using Vec2 objects
- Replace natives text functions with font.render using Vec2 position
- Correct signatures: graphics.drawRectangle(null, Vec2, Vec2, colour...)
- Correct signatures: font.render(text, Vec2, width, align, justify, size, colour)
2026-01-12 15:41:25 +00:00
Claude
686f80d49c Fix server-side API errors: use toColour, Vec3, spawnPlayer, giveWeapon
- Replace color arrays with toColour() integer format for message/messageClient
- Replace position arrays with Vec3 objects for player/vehicle positions
- Use pos.x, pos.y, pos.z instead of pos[0], pos[1], pos[2]
- Fix client.spawn() to client.spawnPlayer(Vec3, heading, skin)
- Fix client.giveWeapon() to client.player.giveWeapon()

Fixed files: freeroam, admin, chat, world, teleport, vehicles, modmenu
2026-01-12 15:16:21 +00:00
Claude
fee097c7db Fix mod menu client-side drawing API errors
- Remove gta.setCursorEnabled (not available in GTAC)
- Use gui.showCursor with proper checks
- Fix drawing functions to use natives API with correct parameters
- Add fallback drawing methods with try-catch
- Use GTA IV native text/rect drawing functions
2026-01-10 23:28:55 +00:00
Claude
dad2741754 Add interactive mod menu with GUI for all players
Features:
- Press F5 to open/close the mod menu
- Self options: health, armor, weapons, god mode, skins
- Vehicle spawner: 50+ vehicles organized by category
- Vehicle options: repair, flip, colors, drift mode, handling
- Network options: player list, teleport to other players
- Teleport locations: 15+ Liberty City locations
- World options: time and weather control
- Weapons menu: individual and all weapons
- Fun options: launch, ragdoll, ped spawning

Menu navigation via arrow keys, Enter to select, Backspace to go back
2026-01-10 23:21:39 +00:00