CheiN Posted July 8, 2012 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 ) My scripts: toptimes on scoreboard (server21) Screen on login(scren) Score on scoreboard (score)
Castillo Posted July 8, 2012 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
CheiN Posted July 8, 2012 Author 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? My scripts: toptimes on scoreboard (server21) Screen on login(scren) Score on scoreboard (score)
Castillo Posted July 8, 2012 Posted July 8, 2012 No, porque al iniciar el mapa on tienen los vehiculos, usa onPlayerVehicleEnter. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
CheiN Posted July 8, 2012 Author 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 ) My scripts: toptimes on scoreboard (server21) Screen on login(scren) Score on scoreboard (score)
Castillo Posted July 8, 2012 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. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
CheiN Posted July 8, 2012 Author Posted July 8, 2012 U_U gracias perdon por quitarte tu tiempo My scripts: toptimes on scoreboard (server21) Screen on login(scren) Score on scoreboard (score)
Castillo Posted July 8, 2012 Posted July 8, 2012 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
BorderLine Posted July 9, 2012 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 Actual Nick: [XGN]BorderLine Actual Clan: XLatino Actual Status: Staff, Mod Level 1 (BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline
Recommended Posts