AlvareZ_ Posted March 16, 2013 Posted March 16, 2013 Borre el getElementType creo que no es necesario intenta nuevamente local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer, matchingDimension ) givePlayerMoney ( thePlayer, 1000 ) outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) setTimer ( hill_Enter, 1000, 1 ) function hill_Leave ( thePlayer, matchingDimention ) givePlayerMoney ( thePlayer, 0 ) end addEventHandler ( "onColShapeLeave", hillArea, hill_Enter )
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Posted March 16, 2013 Para el segundo error cambia a esto: if (getElementType(thePlayer) == "player") then Por Esto: if getElementType ( thePlayer ) == "player" then
AlvareZ_ Posted March 16, 2013 Posted March 16, 2013 Como dice ciber, Te quedaria así Intenta: local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then givePlayerMoney ( thePlayer, 1000 ) outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) setTimer ( hill_Enter, 1000, 1 ) function hill_Leave ( thePlayer, matchingDimention ) givePlayerMoney ( thePlayer, 0 ) end addEventHandler ( "onColShapeLeave", hillArea, hill_Enter )
JesusAliso Posted March 16, 2013 Author Posted March 16, 2013 Aun me sigue diciendo del errror de getElementType
AlvareZ_ Posted March 16, 2013 Posted March 16, 2013 A no ps, Intenta esto si no me rindo ._. local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer, matchingDimension ) givePlayerMoney ( thePlayer, 1000 ) outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) setTimer ( hill_Enter, 1000, 1 ) function hill_Leave ( thePlayer, matchingDimention ) givePlayerMoney ( thePlayer, 0 ) end addEventHandler ( "onColShapeLeave", hillArea, hill_Enter )
JesusAliso Posted March 16, 2013 Author Posted March 16, 2013 Creo que mejor dejemos asi. Haora tira los primeros errores que dije y otro que dice" linea 6 attempt to concatenate a boolean value"
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Posted March 16, 2013 Lool men no se...Seguro que has copiado todo bien? Xq lo he probado y anda
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Posted March 16, 2013 Igual lo de alvarez seria: outputChatBox( .. (getPlayerName(thePlayer)) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 )
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Posted March 16, 2013 No, me anda como dije yo, no intente el tuyo
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Posted March 16, 2013 Como dice ciber, Te quedaria así Intenta: local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then givePlayerMoney ( thePlayer, 1000 ) outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) setTimer ( hill_Enter, 1000, 1 ) function hill_Leave ( thePlayer, matchingDimention ) givePlayerMoney ( thePlayer, 0 ) end addEventHandler ( "onColShapeLeave", hillArea, hill_Enter )
Sasu Posted March 16, 2013 Posted March 16, 2013 Que quieres lo que haga. Es que no quiero leer lo otro
JesusAliso Posted March 16, 2013 Author Posted March 16, 2013 Que en una "Área" Cuando entre un jugador, Gane 1000$ por Segundo
Sasu Posted March 16, 2013 Posted March 16, 2013 local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer ) if getElementType ( thePlayer ) == "player" then outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) local ganar = setTimer(givePlayerMoney, 1000, 0, thePlayer, 1000) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function hill_Leave ( thePlayer ) if isTimer(ganar) then killTimer(ganar) end end addEventHandler ( "onColShapeLeave", hillArea, hill_Enter ) Si no funciona, fijate los errores en /debugscript 3 y me los dices.
MTA Team 0xCiBeR Posted March 16, 2013 MTA Team Posted March 16, 2013 te corrigo Sasuke: Pequeñisimo error: local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer ) if getElementType ( thePlayer ) == "player" then outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) local ganar = setTimer(givePlayerMoney, 1000, 0, thePlayer, 1000) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function hill_Leave ( thePlayer ) if isTimer(ganar) then killTimer(ganar) end end addEventHandler ( "onColShapeLeave", hillArea, hill_Leave )
Sasu Posted March 17, 2013 Posted March 17, 2013 te corrigo Sasuke:Pequeñisimo error: local hillArea = createColCuboid ( 1187.7066650391, -1409.201171875, 12.010873603821, 150, 122, 35 ) local hillRadar = createRadarArea ( 1187.7066650391, -1409.201171875, 150, 122, 117, 233, 229, 220 ) function hill_Enter ( thePlayer ) if getElementType ( thePlayer ) == "player" then outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) setRadarAreaFlashing ( hillRadar, true ) local ganar = setTimer(givePlayerMoney, 1000, 0, thePlayer, 1000) end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) function hill_Leave ( thePlayer ) if isTimer(ganar) then killTimer(ganar) end end addEventHandler ( "onColShapeLeave", hillArea, hill_Leave ) Cierto. Me olvide de cambiar la funcion para ejecutar. Muchas Gracias.
MTA Team 0xCiBeR Posted March 17, 2013 MTA Team Posted March 17, 2013 No, por favor :3 ..Avisanos si te sirvio @Jesus
JesusAliso Posted March 17, 2013 Author Posted March 17, 2013 Cuando salgo, Sigue dando dinero ¿Por que?, y donde cambio los segundos y el dinero que da También, Solo me manda 20mil y e cambiado los números y nada por que?
Alexs Posted March 17, 2013 Posted March 17, 2013 Intenta reemplazar la linea 8 por esto: ganar = setTimer(givePlayerMoney, 1000, 0, thePlayer, 1000)
JesusAliso Posted March 17, 2013 Author Posted March 17, 2013 No mentira, Hoara da 1000$ por segundo Gracias Alex y a todos los demas que me ayudaron(Donde cambio el 1000$ y el por segundo)GRACIAS A TODOS Quiero que de 3500$ por 35 segundos, pero muevo los números y da mas de lo normal y no se.
Alexs Posted March 17, 2013 Posted March 17, 2013 ganar = setTimer(givePlayerMoney, 35000, 0, thePlayer, 3500 ) Inténtalo así.
Recommended Posts