Charly_767 Posted May 10, 2013 Posted May 10, 2013 Hola a todos tengo problemas con este script que he modificado para MTA, basicamente no funciona , se lo dejo aqui abajo, me podrian decir lo que falla... El funcionamiento de este script, en teoria, era que cuando alguien entre en un vehiculo ( ID 551 - Merit ) en un lugar de la pantalla se muestre una imagen (551.png) function veh_img (theVehicle, seat, jacked) local id = getElementModel ( theVehicle ) dxDrawImage ( screenWidth - 290, 500, 250, 50, "veh_names/".. tostring( id ) .. ".png") end addEventHandler("onPlayerVehicleEnter", getRootElement(), veh_img) Bueno en realidad seria una imagen para cada auto, pero eso si el scrpt funciona, el codigo original : https://wiki.multitheftauto.com/wiki/GetVehicleName
Alexs Posted May 10, 2013 Posted May 10, 2013 'dxDrawImage' necesita de 'onClientRender' para funcionar pues su duración es efímera. Developer @ MYVAL
Sasu Posted May 11, 2013 Posted May 11, 2013 function veh_img () if isPedInVehicle(localPlayer) then local vehiclePed = getPedOccupiedVehicle(localPlayer) local id = getElementModel(vehiclePed) if id == 551 then dxDrawImage ( screenWidth - 290, 500, 250, 50, "veh_names/".. tostring( id ) .. ".png") end end end addEventHandler("onClientRender", getRootElement(), veh_img) State: Inactive
Recommended Posts