CheiN Posted July 8, 2012 Share Posted July 8, 2012 hola quisiera saber como poner un car color a un user (Race) cuando este entre al server intente con esto: addEventHandler("onPlayerJoin", getAccountData function() if isPlayerInVehicle (setVehicleColor, theVehicle, 0, 255, 0, 0) end end ) Link to comment
Castillo Posted July 8, 2012 Share Posted July 8, 2012 addEventHandler ( "onPlayerJoin", root, function ( ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then setVehicleColor ( vehicle, 0, 255, 0, 0 ) end end ) Esto no te va a funcionar igual, ya que cuando un jugador entra al servidor, no tiene vehiculo, talves deberias usar el evento para cuando un jugador entra en un vehicle: onPlayerVehicleEnter. Link to comment
CheiN Posted July 8, 2012 Author Share Posted July 8, 2012 addEventHandler ( "onMapStarting", root, function ( ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then setVehicleColor ( vehicle, 0, 255, 0, 0 ) end end ) no crees que se puede con on map starting? Link to comment
Castillo Posted July 8, 2012 Share Posted July 8, 2012 No, porque al iniciar el mapa on tienen los vehiculos, usa onPlayerVehicleEnter. Link to comment
CheiN Posted July 8, 2012 Author Share Posted July 8, 2012 addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle) function enterVehicle (theVehicle, seat, jacked) function ( ) local vehicle = getPedOccupiedVehicle ( source ) if ( vehicle ) then setVehicleColor ( vehicle, 0, 255, 0, 0 ) end end ) Link to comment
Castillo Posted July 8, 2012 Share Posted July 8, 2012 function enterVehicle ( theVehicle, seat, jacked ) setVehicleColor ( theVehicle, 0, 255, 0, 0 ) end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle ) Te aconsejo empezar con TODO lo basico de Lua y tambien su sintaxis. Link to comment
CheiN Posted July 8, 2012 Author Share Posted July 8, 2012 U_U gracias perdon por quitarte tu tiempo Link to comment
BorderLine Posted July 9, 2012 Share Posted July 9, 2012 bueno, como ya resolviste tu problema. el race ya tiene funciones de settings para poner algun color especifico a sus autos, pero no funcionaria en rgb, solo en las ID que contiene el gta Link to comment
Recommended Posts