AlvareZ_ Posted January 3, 2013 Share Posted January 3, 2013 Buenas, quisiera saber como agregar varios skins a getElementModel como por ejemplo: if getElementModel( thePlayer ) == 29 then Link to comment
Alexs Posted January 3, 2013 Share Posted January 3, 2013 Algo así? models = {} models[29] = true --así los vas agregando models[31] = true if models[getElementModel( thePlayer)] then --así compruebas si esta en la lista. Link to comment
AlvareZ_ Posted January 3, 2013 Author Share Posted January 3, 2013 se puede con otra forma es q no me anda con lo q lo adjusto Link to comment
Alexs Posted January 3, 2013 Share Posted January 3, 2013 Explica mas específicamente lo que buscas. Link to comment
AlvareZ_ Posted January 3, 2013 Author Share Posted January 3, 2013 asi empiesa el script addEventHandler( 'onColShapeHit', root, function( thePlayer ) donde lo agrego Link to comment
Alexs Posted January 3, 2013 Share Posted January 3, 2013 Quieres que la función solo se ejecute si el jugador tiene uno de los skins especificados? models = {} models[29] = true --así los vas agregando models[31] = true addEventHandler( 'onColShapeHit', root, function( thePlayer ) if models[getElementModel( thePlayer)] then --así compruebas si esta en la lista. Link to comment
AlvareZ_ Posted January 3, 2013 Author Share Posted January 3, 2013 No anda models = {} models[29] = true --así los vas agregando models[31] = true addEventHandler( 'onColShapeHit', root, function( thePlayer ) if models[getElementModel( thePlayer)] then Link to comment
Alexs Posted January 3, 2013 Share Posted January 3, 2013 Por que no es un código completo, solo lo agregue a lo que tu me diste. Link to comment
AlvareZ_ Posted January 3, 2013 Author Share Posted January 3, 2013 te lo paso por pm Link to comment
NodZen Posted January 3, 2013 Share Posted January 3, 2013 Màs skins?... Puedes usar una tabla o asì if getElementModel( thePlayer ) == 29 or 30 or 31 then Link to comment
Alexs Posted January 3, 2013 Share Posted January 3, 2013 Màs skins?... Puedes usar una tabla o asì if getElementModel( thePlayer ) == 29 or 30 or 31 then Creo que seria: if getElementModel( thePlayer ) == 29 or getElementModel( thePlayer ) == 30 or getElementModel( thePlayer ) == 31 then Link to comment
AlvareZ_ Posted January 3, 2013 Author Share Posted January 3, 2013 Gracias alex me funciono! Gracias a ti tambien NOD Link to comment
NodZen Posted January 3, 2013 Share Posted January 3, 2013 Gracias alex me funciono! Gracias a ti tambien NOD ok Link to comment
Alexs Posted January 3, 2013 Share Posted January 3, 2013 Lo probé y funciono, jamas lo había visto funcionar en otros lenguajes. No lo usaría mucho, existen métodos mas eficientes. Link to comment
AlvareZ_ Posted January 4, 2013 Author Share Posted January 4, 2013 ahm y me ayudarian a calcular esto: createRadarArea createColCuboid una forma para calcularla rapido y sin problemas Link to comment
Alexs Posted January 4, 2013 Share Posted January 4, 2013 Para crear uno? yo uso el coleditor. https://community.multitheftauto.com/index.php?p= ... ls&id=3804 Link to comment
Recommended Posts