depato123 Posted December 1, 2013 Share Posted December 1, 2013 hola, tengo un problema con este script local vehroleq = createVehicle ( 436, -1323.3212890625, 2702.109375, 49.833282470703 ) setElementRotation ( vehroleq, 0,0,210 ) function lice(player) if getElementData( player, "carLicence" ) then outputChatBox ( "Si Ves esto funciona", player, 255, 193, 37, true ) else outputChatBox ( "No Tienes Licencia de Autos", player, 255, 193, 37, true ) cancelEvent ( ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lice ) ¿Como puedo hacer que un user no pueda entrar a ningun vehiculo a exepcion del vehiculo "vehroleq"? osea que un user no pueda entrar a ningun vehiculo pero al vehiculo vehroleq si pueda Link to comment
Sensacion Posted December 1, 2013 Share Posted December 1, 2013 if source == vehroleq then return end Link to comment
depato123 Posted December 1, 2013 Author Share Posted December 1, 2013 así? function lice(player) if getElementData( player, "carLicence" ) then outputChatBox ( "Si Ves esto funciona", player, 255, 193, 37, true ) else if source == vehroleq then return end outputChatBox ( "No Tienes Licencia de Autos", player, 255, 193, 37, true ) cancelEvent ( ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lice ) o así? function lice(player) if getElementData( player, "carLicence" ) then outputChatBox ( "Si Ves esto funciona", player, 255, 193, 37, true ) else if source == vehroleq then return end outputChatBox ( "No Tienes Licencia de Autos", player, 255, 193, 37, true ) cancelEvent ( ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lice ) perdon, es que nunca use eso Link to comment
Sensacion Posted December 1, 2013 Share Posted December 1, 2013 local vehroleq = createVehicle ( 436, -1323.3212890625, 2702.109375, 49.833282470703 ) setElementRotation ( vehroleq, 0,0,210 ) function lice( player ) if source == vehroleq then return end if getElementData( player, "carLicence" ) then outputChatBox ( "Si Ves esto funciona", player, 255, 193, 37, true ) else outputChatBox ( "No Tienes Licencia de Autos", player, 255, 193, 37, true ) cancelEvent ( ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lice ) Link to comment
depato123 Posted December 1, 2013 Author Share Posted December 1, 2013 Ajajajaaja estaba haciendo cualquier cosa perdon, y gracias. Link to comment
Recommended Posts