Narutimmy Posted July 10, 2013 Share Posted July 10, 2013 Hola bueno quiero que los skins 67,68,69,y 70 no puedan entrar a ningun auto pero no me funciona function bloqeo ( thePlayer, seat, jacked ) local id = getElementModel ( source ) if ( seat == 0 ) and ( id == 67 or id == 68 or id == 69 or id == 70 ) then cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo ) Link to comment
AlvareZ_ Posted July 10, 2013 Share Posted July 10, 2013 No estoy seguro pero intenta: -- #Server-Side function bloqeo ( thePlayer, seat, jacked ) if ( seat == 0 ) then if (getElementModel( thePlayer ) == 67) or (getElementModel( thePlayer ) == 68) or (getElementModel( thePlayer ) == 69) or (getElementModel( thePlayer ) == 70) then outputChatBox ( "No puedes usar este Coche!", thePlayer, 255, 0, 0, false ) cancelEvent() end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo ) Link to comment
Arsilex Posted July 10, 2013 Share Posted July 10, 2013 function bloqeo ( thePlayer, seat, jacked ) local id = getElementModel ( thePlayer ) if ( seat == 0 ) and ( id == 67 or id == 68 or id == 69 or id == 70 ) then cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo ) tenias puesto getElementModel(source) y source no esta definido. Link to comment
Narutimmy Posted July 10, 2013 Author Share Posted July 10, 2013 function bloqeo ( thePlayer, seat, jacked ) local id = getElementModel ( thePlayer ) if ( seat == 0 ) and ( id == 67 or id == 68 or id == 69 or id == 70 ) then cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo ) tenias puesto getElementModel(source) y source no esta definido. Gracias ahora si funciona Link to comment
Alexs Posted July 10, 2013 Share Posted July 10, 2013 function bloqeo ( thePlayer, seat, jacked ) local id = getElementModel ( thePlayer ) if ( seat == 0 ) and ( id == 67 or id == 68 or id == 69 or id == 70 ) then cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo ) tenias puesto getElementModel(source) y source no esta definido. Te corrijo: 'source' si esta definido pero representa al vehículo en el que el jugador entra. Link to comment
Arsilex Posted July 10, 2013 Share Posted July 10, 2013 function bloqeo ( thePlayer, seat, jacked ) local id = getElementModel ( thePlayer ) if ( seat == 0 ) and ( id == 67 or id == 68 or id == 69 or id == 70 ) then cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), bloqeo ) tenias puesto getElementModel(source) y source no esta definido. Te corrijo: 'source' si esta definido pero representa al vehículo en el que el jugador entra. es posible no mire el evento ... asi que no sabia solo mire los argumentos... Link to comment
Recommended Posts