NodZen Posted March 19, 2013 Posted March 19, 2013 No lo cambie y aun sigue diciendo :Lua:14: Bad argument @ bindKey Para que pones otro end debajo del bind?
JesusAliso Posted March 19, 2013 Author Posted March 19, 2013 No lo puse hay, para probar si funcionaba pero igual no hace nada el bindKey estaba de ultimo
Sasu Posted March 19, 2013 Posted March 19, 2013 No te sale el outputChatBox porque solo se va ejecutar si presionas Z. Prueba asi: Marker = createMarker ( 1294.7626953125, -1379.625, 13.486034584045, "corona",1.5,90,253,70,163) function check (thePlayer, source) if ( isElementWithinMarker( thePlayer, Marker ) ) then local money = getPlayerMoney(thePlayer) if (money > 1000) then setPedArmor ( thePlayer, 10 ) else outputChatBox ("No tienes Dinero para comprar Armor!", source, 8, 224, 13 ) end end end bindKey(thePlayer, "z", "down", check) function decir(hitElement) outputChatBox ("Preciona Z para comprar el armor!", hitElement, 8, 224, 13 ) end addEventHandler("onMarkerHit", Marker, decir)
JesusAliso Posted March 20, 2013 Author Posted March 20, 2013 Sigue y Sigue tirando e error en el bindKey
X-SHADOW Posted March 20, 2013 Posted March 20, 2013 Marker = createMarker ( 1294.7626953125, -1379.625, 13.486034584045, "corona",1.5,90,253,70,163) addEventHandler('onMarkerHit', Marker, function (hitElement) if (getElementType(hitElement) == 'player' ) then if (getPlayerMoney(hitElement) >= 1000 ) then setPedArmor ( hitElement, 10 ) else outputChatBox ("No tienes Dinero para comprar Armor!", hitElement, 8, 224, 13 ) end end end )
JesusAliso Posted March 20, 2013 Author Posted March 20, 2013 Les doy gracias a todos aquellos que me ayudaron, SHADOW y gracias tu script si funciono aun que no sea con un bind pero gracias. Me podrías decir por que nunca funciono el bindKey?
Plate Posted March 20, 2013 Posted March 20, 2013 el bindkey lo tenes que poner dentro del script del marker creo
Castillo Posted March 20, 2013 Posted March 20, 2013 Marker = createMarker ( 1294.7626953125, -1379.625, 13.486034584045, "corona", 1.5, 90, 253, 70, 163 ) function check ( thePlayer ) if ( isElementWithinMarker ( thePlayer, Marker ) ) then local money = getPlayerMoney ( thePlayer ) if ( money >= 1000 ) then setPedArmor ( thePlayer, 10 ) else outputChatBox ( "No tienes Dinero para comprar Armor!", thePlayer, 8, 224, 13 ) end end end function decir ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( not isPedInVehicle ( hitElement ) ) then if ( eventName == "onMarkerHit" ) then outputChatBox ("Preciona Z para comprar el armor!", hitElement, 8, 224, 13 ) bindKey ( hitElement, "z", "down", check ) else unbindKey ( hitElement, "z", "down", check ) end end end end addEventHandler ( "onMarkerHit", Marker, decir ) addEventHandler ( "onMarkerLeave", Marker, decir )
JesusAliso Posted March 20, 2013 Author Posted March 20, 2013 Aun que creo que todos pensamos y intentamos y todos intentaron muchas veces, nunca lo haría solo ese script Jejejeje... Gracias a Todos los que me ayudaron también a ti Solid Gracias
NodZen Posted March 20, 2013 Posted March 20, 2013 (edited) Aun que creo que todos pensamos y intentamos y todos intentaron muchas veces, nunca lo haría solo ese script Jejejeje...Gracias a Todos los que me ayudaron también a ti Solid Gracias No hay problema , Yo tampoco lo hubiese echo a ese script . Solid es el que más sabe Almenos del habla hispana. Edited March 20, 2013 by Guest
JesusAliso Posted March 20, 2013 Author Posted March 20, 2013 Tengo que ponerle si quiero aprender Jejejeje.
JesusAliso Posted March 21, 2013 Author Posted March 21, 2013 Disculpa solid, si es mucho. como se pone para que le reste el dinero que vale?
Alexs Posted March 21, 2013 Posted March 21, 2013 Disculpa solid, si es mucho. como se pone para que le reste el dinero que vale? takePlayerMoney
JesusAliso Posted March 22, 2013 Author Posted March 22, 2013 Lo Puse pero. no tiene dinero igual le resta y si sigue presionando Z estando en el marker igual le resta
Plate Posted March 22, 2013 Posted March 22, 2013 Pusistes local pMoney = getPlayerMoney(source) if pMoney >= elprecio then
JesusAliso Posted March 23, 2013 Author Posted March 23, 2013 Marker = createMarker ( 1294.6767578125, -1337.5, 17.860641479492, "cylinder", 1.5, 255, 0, 0, 255 ) function check ( thePlayer ) if ( isElementWithinMarker ( thePlayer, Marker ) ) then local money = getPlayerMoney ( thePlayer ) if money >= 30000 then setPedArmor ( thePlayer, 100 ) else outputChatBox ( "No tienes Dinero para comprar Armor!", thePlayer, 8, 224, 13 ) end end end function decir ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( not isPedInVehicle ( hitElement ) ) then if ( eventName == "onMarkerHit" ) then outputChatBox ("Preciona Z para comprar el armor Costo: 30.000$", hitElement, 8, 224, 13 ) bindKey ( hitElement, "z", "down", check ) else unbindKey ( hitElement, "z", "down", check ) end end end end addEventHandler ( "onMarkerHit", Marker, decir ) addEventHandler ( "onMarkerLeave", Marker, decir ) Asi? Perdón por no responder rápido, se esta yendo mucho la luz.
Sasu Posted March 23, 2013 Posted March 23, 2013 Marker = createMarker ( 1294.6767578125, -1337.5, 17.860641479492, "cylinder", 1.5, 255, 0, 0, 255 ) function check ( thePlayer ) if ( isElementWithinMarker ( thePlayer, Marker ) ) then local money = getPlayerMoney ( thePlayer ) if money >= 30000 then takePlayerMoney ( thePlayer, 30000 ) setPedArmor ( thePlayer, 100 ) else outputChatBox ( "No tienes Dinero para comprar Armor!", thePlayer, 8, 224, 13 ) end end end function decir ( hitElement ) if ( getElementType ( hitElement ) == "player" ) then if ( not isPedInVehicle ( hitElement ) ) then if ( eventName == "onMarkerHit" ) then outputChatBox ("Preciona Z para comprar el armor Costo: 30.000$", hitElement, 8, 224, 13 ) bindKey ( hitElement, "z", "down", check ) else unbindKey ( hitElement, "z", "down", check ) end end end end addEventHandler ( "onMarkerHit", Marker, decir ) addEventHandler ( "onMarkerLeave", Marker, decir )
Recommended Posts