void CShadows::StoreCarLightShadow(CVehicle* vehicle, int id, RwTexture* texture,…
- User
void CShadows::StoreCarLightShadow(CVehicle* vehicle, int id, RwTexture* texture, CVector* posn, float frontX, float frontY, float sideX, float sideY, unsigned char red, unsigned char green, unsigned char blue, float maxViewAngle) { ((void(__cdecl )(CVehicle, int, RwTexture*, CVector*, float, float, float, float, unsigned char, unsigned char, unsigned char, float))0x70C500)(vehicle, id, texture, posn, frontX, frontY, sideX, sideY, red, green, blue, maxViewAngle); } перепиши на lua используя этот шаблон local mem = require "memory" local font = nil
function main() repeat wait(0) until isSampAvailable() font = renderCreateFont("Small Fonts", 8, FCR_BORDER) w, h = getScreenResolution() while true do local car = nil if isCharInAnyCar(playerPed) then car = storeCarCharIsInNoSave(playerPed) end if car then car = getCarPointer(car) end -- CPlaceable +0x00 if car ~= nil then local panelid = mem.getuint16(car+0xF8) -- CPlaceable > CEntity > CPhysical +0xF8 local colx = mem.getfloat(car+0xEC+0) -- CPlaceable > CEntity > CPhysical +0xEC local coly = mem.getfloat(car+0xEC+4) local colz = mem.getfloat(car+0xEC+8) renderFontDrawText(font, string.format("panel 0x%x colpoint %.2f %.2f %.2f", panelid, colx, coly, colz), w/2, h/2, 0xffffffff) end wait(1) end end
function onExitScript() if font then renderReleaseFont(font) end end
- Assistant
local mem = require "memory" local font = nil
function main() repeat wait(0) until isSampAvailable() font = renderCreateFont("Small Fonts", 8, FCR_BORDER) w, h = getScreenResolution() while true do local vehicle = nil if isCharInAnyCar(playerPed) then vehicle = storeCarCharIsInNoSave(playerPed) end if vehicle then vehicle = getCarPointer(vehicle) end if vehicle ~= nil then local id = mem.getint(vehicle+0x84) -- CVehicle +0x84 local texture = mem.getint(vehicle+0xAC) -- CVehicle +0xAC local posn = mem.getvector(vehicle+0x50) -- CVehicle +0x50 local frontX = mem.getfloat(vehicle+0x80) -- CVehicle +0x80 local frontY = mem.getfloat(vehicle+0x84) local sideX = mem.getfloat(vehicle+0x88) local sideY = mem.getfloat(vehicle+0x8C) local red = mem.getchar(vehicle+0x94) local green = mem.getchar(vehicle+0x95) local blue = mem.getchar(vehicle+0x96) local maxViewAngle = mem.getfloat(vehicle+0xA8) renderFontDrawText(font, string.format("id %d texture 0x%x posn %.2f %.2f %.2f front %.2f %.2f side %.2f %.2f RGB %d %d %d angle %.2f", id, texture, posn.x, posn.y, posn.z, frontX, frontY, sideX, sideY, red, green, blue, maxViewAngle), w/2, h/2, 0xffffffff) end wait(1) end end