-
Posts
1,004 -
Joined
-
Last visited
Everything posted by Narutimmy
-
Quiero que el que use el modelo 35 al golpear a una persona le quite 50 de vida
-
Hola bueno quiero que al ser atacado la Humanidad pierda 50 y la vida 50.. pero no pasa.. cual es el error? Cl ---Matar 1 function bot ( attacker ) local id2 = getElementModel ( slothbot1 ) if attacker == slothbot1 then -- if ( getElementType ( attacker ) == "ped" ) then if (getElementModel(slothbot1) == 35 ) then setElementHealth ( source, getElementHealth(source) - 50 ) humanidad = humanidad - 50 end end end addEventHandler("onClientPlayerDamage", getRootElement(), bot) end
-
Tengo un problema nose que pasa pero entro al Area y comienza a Parpadear... unos pocos segundos pero... luego deja de flashear y aonque la barra se llene no se conquista me ayudan? Sv: ---FOLT local pArea = createRadarArea( -1466.60, 486.75, 213, 120, 255, 255, 255, 180 ) local pCuboid = createColCuboid( -1466.60, 486.75, 9, 210, 120, 15 ) ---OSS local pArea2 = createRadarArea( 2980, -900, 300, 300, 255, 255, 255, 180 ) local pCuboid2 = createColCuboid( 2980, -900, 29, 300, 300, 35 ) ---Area 51 local pArea3 = createRadarArea( 93, 1800, 200, 200, 255, 255, 255, 180 ) local pCuboid3 = createColCuboid( 93, 1800, 1, 200, 200, 10 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned on! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) end ) --[[addEventHandler("onResourceStop", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned off! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) saveS = xmlLoadFile( 'file_saves.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'saved', 'nothing new' ) end )]] addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado la Base FOLT!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000La Base FOLT a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) triggerClientEvent(player, 'countdowncan', player) setRadarAreaFlashing( pArea, false ) end, 100000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) -----oss addEventHandler( 'onColShapeHit', pCuboid2, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea2 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea2, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea2, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado la Base OSS!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000La Base OSS a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) triggerClientEvent(player, 'countdowncan', player) setRadarAreaFlashing( pArea2, false ) end, 100000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) -----51 addEventHandler( 'onColShapeHit', pCuboid3, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea3 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea3, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea3, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado el Area 51!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000El Area 51 a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) triggerClientEvent(player, 'countdowncan', player) setRadarAreaFlashing( pArea3, false ) end, 100000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) CL: local sWidth, sHeight = guiGetScreenSize() local Conquista = 0 addEventHandler( "onClientRender", root, function ( ) lineLength = 114 * ( Conquista / 100 ) lineLength5 = 114 * ( 100 / 100 ) dxDrawRectangle(sWidth-206,sHeight-68,lineLength,10.0,tocolor(0, 255, 0, 255),false) dxDrawRectangle(sWidth-206,sHeight-68,lineLength5,10.0,tocolor(0, 255, 0, 170),false) end ) addEvent('countdown', true) function reduceCountdown( ) outputChatBox( "La Conquista a Comenzado!!!", player, 0, 255, 0, true ); pAreaTimer = setTimer( function() if Conquista <= 99 then Conquista = Conquista + 1 end end,1000,100 ) end addEventHandler('countdown', root, reduceCountdown) addEvent('countdowncan', true) function reduceCountdown2( ) Conquista = 0 end addEventHandler('countdowncan', root, reduceCountdown2) addEvent('time', true); addEventHandler('time', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters = guiCreateFont( 'font.ttf', 20 ); test = guiCreateLabel( w*0.0002, h*0.0011, 0.475, 0.1, '1.40 Minutos para Conquistar', true ); guiLabelSetColor( test, 255, 255, 0 ) guiSetFont( test, styleLetters ); setTimer( function( ) if isElement( test ) then destroyElement( test ); end end, 5000, 1 ); end ); addEvent('friendly', true); addEventHandler('friendly', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters2 = guiCreateFont( 'font.ttf', 20 ); test2 = guiCreateLabel( w*0.00025, h*0.0011, 0.475, 0.1, 'Has Entrado a Territorio Amigo.', true ); guiLabelSetColor( test2, 0, 255, 0 ) guiSetFont( test2, styleLetters2 ); setTimer( function( ) if isElement( test2 ) then destroyElement( test2 ); end end, 5000, 1 ); end ); addEvent('group', true); addEventHandler('group', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters3 = guiCreateFont( 'font.ttf', 20 ); test3 = guiCreateLabel( w*0.0003, h*0.0011, 0.475, 0.1, 'You need a group.', true ); guiLabelSetColor( test3, 255, 0, 0 ) guiSetFont( test3, styleLetters3 ); setTimer( function( ) if isElement( test3 ) then destroyElement( test3 ); end end, 5000, 1 ); end ); addEvent('time2', true); addEventHandler('time2', root, function( ) if isElement( test ) then destroyElement( test ) outputChatBox( "La Conquista Cancelada!!!", player, 0, 255, 0, true ); killTimer ( pAreaTimer ) setTimer( function() if Conquista >= 0 then Conquista = Conquista - 2 end end,1000,100 ) end end ); addEvent('friendly2', true); addEventHandler('friendly2', root, function( ) if isElement( test2 ) then destroyElement( test2 ) end end );
-
Bueno no entendi pero trate de usar una barra creada con DX... pero.. Sv: ---FOLT local pArea = createRadarArea( -1466.60, 486.75, 213, 120, 255, 255, 255, 180 ) local pCuboid = createColCuboid( -1466.60, 486.75, 9, 210, 120, 15 ) ---OSS local pArea2 = createRadarArea( 2980, -900, 300, 300, 255, 255, 255, 180 ) local pCuboid2 = createColCuboid( 2980, -900, 10, 300, 300, 29.54 ) ---Area 51 local pArea3 = createRadarArea( 93, 1800, 200, 200, 255, 255, 255, 180 ) local pCuboid3 = createColCuboid( 93, 1800, 1, 200, 200, 10 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned on! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) end ) --[[addEventHandler("onResourceStop", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned off! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) saveS = xmlLoadFile( 'file_saves.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'saved', 'nothing new' ) end )]] addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado la Base FOLT!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000La Base FOLT a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) triggerClientEvent(player, 'countdowncan', player) setRadarAreaFlashing( pArea, false ) end, 100000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) -----oss addEventHandler( 'onColShapeHit', pCuboid2, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea2 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea2, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea2, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado la Base OSS!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000La Base OSS a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) triggerClientEvent(player, 'countdowncan', player) setRadarAreaFlashing( pArea2, false ) end, 100000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) -----51 addEventHandler( 'onColShapeHit', pCuboid3, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea3 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea3, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea3, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado el Area 51!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000El Area 51 a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) triggerClientEvent(player, 'countdowncan', player) setRadarAreaFlashing( pArea3, false ) end, 100000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) Cl: local sWidth, sHeight = guiGetScreenSize() local Conquista = 0 addEventHandler( "onClientRender", root, function ( ) lineLength = 114 * ( Conquista / 100 ) lineLength5 = 114 * ( 100 / 100 ) dxDrawRectangle(sWidth-206,sHeight-68,lineLength,10.0,tocolor(0, 255, 0, 255),false) dxDrawRectangle(sWidth-206,sHeight-68,lineLength5,10.0,tocolor(0, 255, 0, 170),false) end ) addEvent('countdown', true) function reduceCountdown( ) outputChatBox( "La Conquista a Comenzado!!!", player, 0, 255, 0, true ); setTimer( function() if Conquista <= 99 then Conquista = Conquista + 1 end end,1000,100 ) end addEventHandler('countdown', root, reduceCountdown) addEvent('countdowncan', true) function reduceCountdown2( ) Conquista = 0 end addEventHandler('countdowncan', root, reduceCountdown2) addEvent('time', true); addEventHandler('time', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters = guiCreateFont( 'font.ttf', 20 ); test = guiCreateLabel( w*0.0002, h*0.0011, 0.475, 0.1, '1.40 Minutos para Conquistar', true ); guiLabelSetColor( test, 255, 255, 0 ) guiSetFont( test, styleLetters ); setTimer( function( ) if isElement( test ) then destroyElement( test ); end end, 5000, 1 ); end ); addEvent('friendly', true); addEventHandler('friendly', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters2 = guiCreateFont( 'font.ttf', 20 ); test2 = guiCreateLabel( w*0.00025, h*0.0011, 0.475, 0.1, 'Has Entrado a Territorio Amigo.', true ); guiLabelSetColor( test2, 0, 255, 0 ) guiSetFont( test2, styleLetters2 ); setTimer( function( ) if isElement( test2 ) then destroyElement( test2 ); end end, 5000, 1 ); end ); addEvent('group', true); addEventHandler('group', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters3 = guiCreateFont( 'font.ttf', 20 ); test3 = guiCreateLabel( w*0.0003, h*0.0011, 0.475, 0.1, 'You need a group.', true ); guiLabelSetColor( test3, 255, 0, 0 ) guiSetFont( test3, styleLetters3 ); setTimer( function( ) if isElement( test3 ) then destroyElement( test3 ); end end, 5000, 1 ); end ); addEvent('time2', true); addEventHandler('time2', root, function( ) if isElement( test ) then destroyElement( test ) outputChatBox( "La Conquista Cancelada!!!", player, 0, 255, 0, true ); setTimer( function() if Conquista >= 0 then Conquista = Conquista - 50 end end,1000,100 ) end end ); addEvent('friendly2', true); addEventHandler('friendly2', root, function( ) if isElement( test2 ) then destroyElement( test2 ) end end ); Al entrar la Barra aumenta pero se se cancela la conquista la barra sigue creciendo use un timer, ahi una forma de eliminar el timer?
-
Gracias ahora si funciona
-
me darias un ejemplo? esa si no se usarla
-
Hola lo que pasa es que una vez que muere no spawnea de nuevo algun error? solo spawnea 1 vez y luego nada me dice un error de "isElementWithinColShape " ----BOSS local colshape = createColRectangle ( -2960, -2960, 5920, 5920 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel local zombiesMatados = 0 local weapons = { [ 33 ] = 38, } function zona (attacker, weapon, bodypart) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = ( zombiesMatados + 1 ) if ( zombiesMatados == 100 ) then --Numero de Zombis por Matar if ( not isElement ( slothbot1 ) ) then local x, y, z = getElementPosition(attacker) local skin = math.random ( 33, 35 ) local vida = exports.extra_health:getElementExtraHealth(slothbot1) slothbot1 = exports [ "slothbot" ]:spawnBot ( x+10, y, z+3, 90, skin, 0, 0, false, weapons [ skin ] or 0, "hunting" ) if slothbot1 then triggerClientEvent("spawneo", getRootElement()) myBlip = createBlipAttachedTo ( slothbot1, 23 ) setElementData(slothbot1, "Witch", true) local id = getElementModel ( slothbot1 ) if id == 33 then exports.extra_health:setElementExtraHealth(slothbot1, 30000) setElementData(slothbot1, "Witch", true) outputChatBox ( "#ff0000Nemesis: #eeff00S.T.A.R.S!!!", getRootElement(), 255, 255, 255, true) elseif id == 34 then exports.extra_health:setElementExtraHealth(slothbot1, 100000) outputChatBox ( "#ff0000Tyrant a Spawneado, Corre!", getRootElement(), 255, 255, 255, true) elseif id == 35 then exports.extra_health:setElementExtraHealth(slothbot1, 400000) outputChatBox("Lincker a Spawneado...", getRootElement(), 155, 155, 155, false) end setElementData( slothbot1, "currenthealth", exports.extra_health:getElementExtraHealth( slothbot1 ) ) end end end end end addEventHandler ( "onZombieWasted", getRootElement(), zona ) ---RepawnBots function restartear ( ) zombiesMatados = 0 end addEvent ( "onBotWasted", true ) function repa () setTimer( restartear, 5000, 1 ) end addEventHandler ( "onBotWasted",getRootElement(), repa )
-
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 )
-
Hola tengo este scrip que es para conquistar Territorios pero el problema es que la conquista toma solo 5 segundos.. y quiero que tome 5minutos... ademas no ahi manera de saber cuanto tiempo llebas, quiero poner algo como una barra de progreso , me podrian ayudar a editarlo? Sv: ---FOLT local pArea = createRadarArea( -1466.60, 486.75, 213, 120, 255, 255, 255, 180 ) local pCuboid = createColCuboid( -1466.60, 486.75, 10, 210, 120, 15 ) ---OSS local pArea2 = createRadarArea( 2980, -900, 300, 300, 255, 255, 255, 180 ) local pCuboid2 = createColCuboid( 2980, -900, 10, 300, 300, 29.54 ) ---Area 51 local pArea3 = createRadarArea( 93, 1800, 200, 200, 255, 255, 255, 180 ) local pCuboid3 = createColCuboid( 93, 1800, 1, 200, 200, 10 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned on! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) end ) --[[addEventHandler("onResourceStop", resourceRoot, function() outputDebugString("|~| Turf system by manve1 |~| Has been turned off! |~| This system was downloaded from MTA Community. |~|", 3, 0, 255, 0) saveS = xmlLoadFile( 'file_saves.xml' ) local save_info = xmlFindChild(saveS, 'turf', 0) xmlNodeSetAttribute( save_info, 'saved', 'nothing new' ) end )]] addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado la Base FOLT!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000La Base FOLT a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) setRadarAreaFlashing( pArea, false ) end, 5000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid ) then setRadarAreaFlashing( pArea, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) -----oss addEventHandler( 'onColShapeHit', pCuboid2, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea2 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea2, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea2, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado la Base OSS!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000La Base OSS a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) setRadarAreaFlashing( pArea2, false ) end, 5000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid2 ) then setRadarAreaFlashing( pArea2, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) -----51 addEventHandler( 'onColShapeHit', pCuboid3, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea3 ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea3, true ) triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea3, iR, iG, iB, 100); givePlayerMoney( player, 4000 ); outputChatBox( "Felicidades, #FFFF00 Has conquistado el Area 51!", player, 0, 255, 0, true ); outputChatBox ( "#ff0000El Area 51 a sido Conquistada!!!", getRootElement(), 255, 255, 255, true) setRadarAreaFlashing( pArea3, false ) end, 5000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) addEventHandler( 'onColShapeLeave', root, function( player ) if( source == pCuboid3 ) then setRadarAreaFlashing( pArea3, false ) triggerClientEvent(player, 'time2', player) triggerClientEvent(player, 'friendly2', player) if isTimer( pArea1Timer ) then killTimer( pArea1Timer ) end end end ) Cl: addEvent('countdown', true) function reduceCountdown( ) cont = 3 setTimer( function() cont = cont -1 outputChatBox( cont, 255, 255, 255 ) end,1000,3 ) end addEventHandler('countdown', root, reduceCountdown) addEvent('time', true); addEventHandler('time', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters = guiCreateFont( 'font.ttf', 20 ); test = guiCreateLabel( w*0.0002, h*0.0011, 0.475, 0.1, '5 Minutos para Conquistar', true ); guiLabelSetColor( test, 255, 255, 0 ) guiSetFont( test, styleLetters ); setTimer( function( ) if isElement( test ) then destroyElement( test ); end end, 5000, 1 ); end ); addEvent('friendly', true); addEventHandler('friendly', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters2 = guiCreateFont( 'font.ttf', 20 ); test2 = guiCreateLabel( w*0.00025, h*0.0011, 0.475, 0.1, 'Has Entrado a Territorio Amigo.', true ); guiLabelSetColor( test2, 0, 255, 0 ) guiSetFont( test2, styleLetters2 ); setTimer( function( ) if isElement( test2 ) then destroyElement( test2 ); end end, 5000, 1 ); end ); addEvent('group', true); addEventHandler('group', root, function( ) local w, h = guiGetScreenSize( ); local styleLetters3 = guiCreateFont( 'font.ttf', 20 ); test3 = guiCreateLabel( w*0.0003, h*0.0011, 0.475, 0.1, 'You need a group.', true ); guiLabelSetColor( test3, 255, 0, 0 ) guiSetFont( test3, styleLetters3 ); setTimer( function( ) if isElement( test3 ) then destroyElement( test3 ); end end, 5000, 1 ); end ); addEvent('time2', true); addEventHandler('time2', root, function( ) if isElement( test ) then destroyElement( test ) end end ); addEvent('friendly2', true); addEventHandler('friendly2', root, function( ) if isElement( test2 ) then destroyElement( test2 ) end end );
-
Hola nose que pasa pero desde ayer que Actualize el MTA... el BOSS ya no spawnea, el debug no me dira ningun Error Sv: ----BOSS local colshape = createColRectangle ( -2960, -2960, 5920, 5920 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel local zombiesMatados = 0 local weapons = { [ 33 ] = 38, [ 35 ] = 8 } function zona (attacker, weapon, bodypart) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = ( zombiesMatados + 1 ) if ( zombiesMatados == 10 ) then --Numero de Zombis por Matar if ( not isElement ( slothbot1 ) ) then local x, y, z = getElementPosition(attacker) local skin = math.random ( 33, 35 ) slothbot1 = exports [ "slothbot" ]:spawnBot ( x+10, y, z+3, 90, skin, 0, 0, false, weapons [ skin ] or 0, "hunting" ) myBlip = createBlipAttachedTo ( slothbot1, 23 ) local id = getElementModel ( slothbot1 ) if id == 33 then exports.extra_health:setElementExtraHealth(slothbot1, 30000) outputChatBox ( "#ff0000Nemesis: #eeff00S.T.A.R.S!!!", getRootElement(), 255, 255, 255, true) elseif id == 34 then exports.extra_health:setElementExtraHealth(slothbot1, 100000) outputChatBox ( "#ff0000Tyrant a Spawneado, Corre!", getRootElement(), 255, 255, 255, true) elseif id == 35 then exports.extra_health:setElementExtraHealth(slothbot1, 15000) outputChatBox("[bOSS]:Boss low spawned", getRootElement(), 155, 155, 155, false) end end end end end addEventHandler ( "onZombieWasted", getRootElement(), zona ) Ya lo Repare :3, Gracias
-
Bueno lo intente asi pero no funciono addEventHandler( "onClientResourceStart", resourceRoot, function() bindKey("fire", "down", theGoggle) for _,blip in ipairs(getElementsByType("blip")) do local r,g,b,a = getBlipColor(blip) setElementDimension ( blip, 0 ) end end ) function theGoggle() local weaponID = getPedWeapon (getLocalPlayer ()) if weaponID == 44 then setTimer (playerGoggles, 50, 0 ) end end function playerGoggles() if isPedDoingTask ( getLocalPlayer (), "TASK_SIMPLE_GOGGLES_ON" ) then for _,blip in ipairs(getElementsByType("blip")) do local r,g,b,a = getBlipColor(blip) setElementDimension ( blip, 2 ) end end if isPedDoingTask ( getLocalPlayer (), "TASK_SIMPLE_GOGGLES_OFF" ) then for _,blip in ipairs(getElementsByType("blip")) do local r,g,b,a = getBlipColor(blip) setElementDimension ( blip, 0 ) end end end addEventHandler( "onClientResourceStop", resourceRoot, function() unbindKey("fire", "down", theGoggle) end ) addEventHandler("onClientPlayerWasted", localPlayer, function () for _,blip in ipairs(getElementsByType("blip")) do local r,g,b,a = getBlipColor(blip) setElementDimension ( blip, 0 ) end end ) addEventHandler("onClientPlayerSpawn", localPlayer, function () for _,blip in ipairs(getElementsByType("blip")) do local r,g,b,a = getBlipColor(blip) setElementDimension ( blip, 0 ) end end )
-
ya lo probe si funciona pero.. nose que pasa que... lo activo y me da stats... llegoa nivel 10 las pierdo, nivel 20 las gano... , probare en otro sv
-
Ya subi pero no muestra ningun mensaje pero si le setea los stas, con setPedStat al tener cierta cantidad puedes disparar y caminar al mismo tiempo pero nose cuanto se ocupa. Ya se de lo que me hablas pero ni idea. Creo que en los 700. Prueba: function PrimerNivel(oldLevel, newLevel) if newLevel == 10 then setPedStat(source, 77, 100) setPedStat(source, 74, 100) setPedStat(source, 79, 100) setPedStat(source, 78, 100) setPedStat(source, 70, 100) setPedStat(source, 69, 100) setPedStat(source, 71, 100) setPedStat(source, 72, 100) setPedStat(source, 76, 100) outputChatBox("Habilidad en Armas al 10%",source, 0, 255, 0, true) outputChatBox("[>---------]",source, 0, 255, 0, true) elseif newLevel == 20 then ---M60--- setPedStat(source, 77, 200) --AA12--- setPedStat(source, 74, 200) --Sniper--- setPedStat(source, 79, 200) ---M4--- setPedStat(source, 78, 200) ---Silend--- setPedStat(source, 70, 200) ---Pistola--- setPedStat(source, 69, 200) ---Deagle--- setPedStat(source, 71, 200) ---Shotgun--- setPedStat(source, 72, 200) ---UMP--- setPedStat(source, 76, 200) outputChatBox("Habilidad en Armas al 20%",source, 0, 255, 0, true) outputChatBox("[>>--------]",source, 0, 255, 0, true) elseif newLevel == 30 then ---M60--- setPedStat(source, 77, 300) --AA12--- setPedStat(source, 74, 300) --Sniper--- setPedStat(source, 79, 300) ---M4--- setPedStat(source, 78, 300) ---Silend--- setPedStat(source, 70, 300) ---Pistola--- setPedStat(source, 69, 300) ---Deagle--- setPedStat(source, 71, 300) ---Shotgun--- setPedStat(source, 72, 300) ---UMP--- setPedStat(source, 76, 300) outputChatBox("Habilidad en Armas al 30%",source, 0, 255, 0, true) outputChatBox("[>>>-------]",source, 0, 255, 0, true) elseif newLevel == 40 then ---M60--- setPedStat(source, 77, 400) --AA12--- setPedStat(source, 74, 400) --Sniper--- setPedStat(source, 79, 400) ---M4--- setPedStat(source, 78, 400) ---Silend--- setPedStat(source, 70, 400) ---Pistola--- setPedStat(source, 69, 400) ---Deagle--- setPedStat(source, 71, 400) ---Shotgun--- setPedStat(source, 72, 400) ---UMP--- setPedStat(source, 76, 400) outputChatBox("Habilidad en Armas al 40%",source, 0, 255, 0, true) outputChatBox("[>>>>------]",source, 0, 255, 0, true) elseif newLevel == 50 then---M60--- setPedStat(source, 77, 500) --AA12--- setPedStat(source, 74, 500) --Sniper--- setPedStat(source, 79, 500) ---M4--- setPedStat(source, 78, 500) ---Silend--- setPedStat(source, 70, 500) ---Pistola--- setPedStat(source, 69, 500) ---Deagle--- setPedStat(source, 71, 500) ---Shotgun--- setPedStat(source, 72, 500) ---UMP--- setPedStat(source, 76, 500) outputChatBox("Habilidad en Armas al 50%",source, 0, 255, 0, true) outputChatBox("[>>>>>-----]",source, 0, 255, 0, true) elseif newLevel == 60 then ---M60--- setPedStat(source, 77, 600) --AA12--- setPedStat(source, 74, 600) --Sniper--- setPedStat(source, 79, 600) ---M4--- setPedStat(source, 78, 600) ---Silend--- setPedStat(source, 70, 600) ---Pistola--- setPedStat(source, 69, 600) ---Deagle--- setPedStat(source, 71, 600) ---Shotgun--- setPedStat(source, 72, 600) ---UMP--- setPedStat(source, 76, 600) outputChatBox("Habilidad en Armas al 60%",source, 0, 255, 0, true) outputChatBox("[>>>>>>----]",source, 0, 255, 0, true) elseif newLevel == 70 then ---M60--- setPedStat(source, 77, 700) --AA12--- setPedStat(source, 74, 700) --Sniper--- setPedStat(source, 79, 700) ---M4--- setPedStat(source, 78, 700) ---Silend--- setPedStat(source, 70, 700) ---Pistola--- setPedStat(source, 69, 700) ---Deagle--- setPedStat(source, 71, 700) ---Shotgun--- setPedStat(source, 72, 700) ---UMP--- setPedStat(source, 76, 700) outputChatBox("Habilidad en Armas al 70%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>---]",source, 0, 255, 0, true) elseif newLevel == 80 then ---M60--- setPedStat(source, 77, 800) --AA12--- setPedStat(source, 74, 800) --Sniper--- setPedStat(source, 79, 800) ---M4--- setPedStat(source, 78, 800) ---Silend--- setPedStat(source, 70, 800) ---Pistola--- setPedStat(source, 69, 800) ---Deagle--- setPedStat(source, 71, 800) ---Shotgun--- setPedStat(source, 72, 800) ---UMP--- setPedStat(source, 76, 800) outputChatBox("Habilidad en Armas al 80%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>>--]",source, 0, 255, 0, true) elseif newLevel == 90 then ---M60--- setPedStat(source, 77, 900) --AA12--- setPedStat(source, 74, 900) --Sniper--- setPedStat(source, 79, 900) ---M4--- setPedStat(source, 78, 900) ---Silend--- setPedStat(source, 70, 900) ---Pistola--- setPedStat(source, 69, 900) ---Deagle--- setPedStat(source, 71, 900) ---Shotgun--- setPedStat(source, 72, 900) ---UMP--- setPedStat(source, 76, 900) outputChatBox("Habilidad en Armas al 90%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>>>-]",source, 0, 255, 0, true) elseif newLevel == 100 then ---M60--- setPedStat(source, 77, 999) --AA12---
-
Ya subi pero no muestra ningun mensaje pero si le setea los stas, con setPedStat al tener cierta cantidad puedes disparar y caminar al mismo tiempo pero nose cuanto se ocupa.
-
me parece que ya funciona no ahi error en el debug solo este: [17:48:36] SCRIPT ERROR: exp_system\statssv.lua:3: 'then' expected near 'setPedStat' [17:48:36] WARNING: Loading script failed: exp_system\statssv.lua:3: 'then' expected near 'setPedStat pero creo es todo y no sale el mensaje en el chat... pero los stats creo si cambian
-
El scrip lo tengo en el mismo que el exp_system , aun asi debo ponerlo? Si. me da este problema WARNING: exp_system\statssv.lua:245: Bad argument @ 'getElementData' [Expected element at argument 1, got number '57']
-
El scrip lo tengo en el mismo que el exp_system , aun asi debo ponerlo?
-
No sirvio Sv: function PrimerNivel(thePlayer) if (getElementData( thePlayer, "Level" ) == "10") then setPedStat(thePlayer, 77, 100) setPedStat(thePlayer, 74, 100) setPedStat(thePlayer, 79, 100) setPedStat(thePlayer, 78, 100) setPedStat(thePlayer, 70, 100) setPedStat(thePlayer, 69, 100) setPedStat(thePlayer, 71, 100) setPedStat(thePlayer, 72, 100) setPedStat(thePlayer, 76, 100) outputChatBox("Habilidad en Armas al 10%",thePlayer, 0, 255, 0, true) outputChatBox("[>---------]",thePlayer, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "20") then ---M60--- setPedStat(thePlayer, 77, 200) --AA12--- setPedStat(thePlayer, 74, 200) --Sniper--- setPedStat(thePlayer, 79, 200) ---M4--- setPedStat(thePlayer, 78, 200) ---Silend--- setPedStat(thePlayer, 70, 200) ---Pistola--- setPedStat(thePlayer, 69, 200) ---Deagle--- setPedStat(thePlayer, 71, 200) ---Shotgun--- setPedStat(thePlayer, 72, 200) ---UMP--- setPedStat(thePlayer, 76, 200) outputChatBox("Habilidad en Armas al 20%",source, 0, 255, 0, true) outputChatBox("[>>--------]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "30") then ---M60--- setPedStat(thePlayer, 77, 300) --AA12--- setPedStat(thePlayer, 74, 300) --Sniper--- setPedStat(thePlayer, 79, 300) ---M4--- setPedStat(thePlayer, 78, 300) ---Silend--- setPedStat(thePlayer, 70, 300) ---Pistola--- setPedStat(thePlayer, 69, 300) ---Deagle--- setPedStat(thePlayer, 71, 300) ---Shotgun--- setPedStat(thePlayer, 72, 300) ---UMP--- setPedStat(thePlayer, 76, 300) outputChatBox("Habilidad en Armas al 30%",source, 0, 255, 0, true) outputChatBox("[>>>-------]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "40") then ---M60--- setPedStat(thePlayer, 77, 400) --AA12--- setPedStat(thePlayer, 74, 400) --Sniper--- setPedStat(thePlayer, 79, 400) ---M4--- setPedStat(thePlayer, 78, 400) ---Silend--- setPedStat(thePlayer, 70, 400) ---Pistola--- setPedStat(thePlayer, 69, 400) ---Deagle--- setPedStat(thePlayer, 71, 400) ---Shotgun--- setPedStat(thePlayer, 72, 400) ---UMP--- setPedStat(thePlayer, 76, 400) outputChatBox("Habilidad en Armas al 40%",source, 0, 255, 0, true) outputChatBox("[>>>>------]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "50") then---M60--- setPedStat(thePlayer, 77, 500) --AA12--- setPedStat(thePlayer, 74, 500) --Sniper--- setPedStat(thePlayer, 79, 500) ---M4--- setPedStat(thePlayer, 78, 500) ---Silend--- setPedStat(thePlayer, 70, 500) ---Pistola--- setPedStat(thePlayer, 69, 500) ---Deagle--- setPedStat(thePlayer, 71, 500) ---Shotgun--- setPedStat(thePlayer, 72, 500) ---UMP--- setPedStat(thePlayer, 76, 500) outputChatBox("Habilidad en Armas al 50%",source, 0, 255, 0, true) outputChatBox("[>>>>>-----]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "60") then ---M60--- setPedStat(thePlayer, 77, 600) --AA12--- setPedStat(thePlayer, 74, 600) --Sniper--- setPedStat(thePlayer, 79, 600) ---M4--- setPedStat(thePlayer, 78, 600) ---Silend--- setPedStat(thePlayer, 70, 600) ---Pistola--- setPedStat(thePlayer, 69, 600) ---Deagle--- setPedStat(thePlayer, 71, 600) ---Shotgun--- setPedStat(thePlayer, 72, 600) ---UMP--- setPedStat(thePlayer, 76, 600) outputChatBox("Habilidad en Armas al 60%",source, 0, 255, 0, true) outputChatBox("[>>>>>>----]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "70") then ---M60--- setPedStat(thePlayer, 77, 700) --AA12--- setPedStat(thePlayer, 74, 700) --Sniper--- setPedStat(thePlayer, 79, 700) ---M4--- setPedStat(thePlayer, 78, 700) ---Silend--- setPedStat(thePlayer, 70, 700) ---Pistola--- setPedStat(thePlayer, 69, 700) ---Deagle--- setPedStat(thePlayer, 71, 700) ---Shotgun--- setPedStat(thePlayer, 72, 700) ---UMP--- setPedStat(thePlayer, 76, 700) outputChatBox("Habilidad en Armas al 70%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>---]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "80") then ---M60--- setPedStat(thePlayer, 77, 800) --AA12--- setPedStat(thePlayer, 74, 800) --Sniper--- setPedStat(thePlayer, 79, 800) ---M4--- setPedStat(thePlayer, 78, 800) ---Silend--- setPedStat(thePlayer, 70, 800) ---Pistola--- setPedStat(thePlayer, 69, 800) ---Deagle--- setPedStat(thePlayer, 71, 800) ---Shotgun--- setPedStat(thePlayer, 72, 800) ---UMP--- setPedStat(thePlayer, 76, 800) outputChatBox("Habilidad en Armas al 80%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>>--]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "90") then ---M60--- setPedStat(thePlayer, 77, 900) --AA12--- setPedStat(thePlayer, 74, 900) --Sniper--- setPedStat(thePlayer, 79, 900) ---M4--- setPedStat(thePlayer, 78, 900) ---Silend--- setPedStat(thePlayer, 70, 900) ---Pistola--- setPedStat(thePlayer, 69, 900) ---Deagle--- setPedStat(thePlayer, 71, 900) ---Shotgun--- setPedStat(thePlayer, 72, 900) ---UMP--- setPedStat(thePlayer, 76, 900) outputChatBox("Habilidad en Armas al 90%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>>>-]",source, 0, 255, 0, true) elseif (getElementData( thePlayer, "Level" ) == "100") then ---M60--- setPedStat(thePlayer, 77, 999) --AA12--- setPedStat(thePlayer, 74, 999)
-
pues ya lo probe y nada, sv: function PrimerNivel() ---M60--- setPedStat(thePlayer, 77, 100) --AA12--- setPedStat(thePlayer, 74, 100) --Sniper--- setPedStat(thePlayer, 79, 100) ---M4--- setPedStat(thePlayer, 78, 100) ---Silend--- setPedStat(thePlayer, 70, 100) ---Pistola--- setPedStat(thePlayer, 69, 100) ---Deagle--- setPedStat(thePlayer, 71, 100) ---Shotgun--- setPedStat(thePlayer, 72, 100) ---UMP--- setPedStat(thePlayer, 76, 100) outputChatBox("Habilidad en Armas al 10%",source, 0, 255, 0, true) outputChatBox("[>---------]",source, 0, 255, 0, true) end addEvent("nivel1", true) addEventHandler("nivel1", root, PrimerNivel) function SegundoNivel() ---M60--- setPedStat(thePlayer, 77, 200) --AA12--- setPedStat(thePlayer, 74, 200) --Sniper--- setPedStat(thePlayer, 79, 200) ---M4--- setPedStat(thePlayer, 78, 200) ---Silend--- setPedStat(thePlayer, 70, 200) ---Pistola--- setPedStat(thePlayer, 69, 200) ---Deagle--- setPedStat(thePlayer, 71, 200) ---Shotgun--- setPedStat(thePlayer, 72, 200) ---UMP--- setPedStat(thePlayer, 76, 200) outputChatBox("Habilidad en Armas al 20%",source, 0, 255, 0, true) outputChatBox("[>>--------]",source, 0, 255, 0, true) end addEvent("nivel2", true) addEventHandler("nivel2", root, SegundoNivel) function TercerNivel() ---M60--- setPedStat(thePlayer, 77, 300) --AA12--- setPedStat(thePlayer, 74, 300) --Sniper--- setPedStat(thePlayer, 79, 300) ---M4--- setPedStat(thePlayer, 78, 300) ---Silend--- setPedStat(thePlayer, 70, 300) ---Pistola--- setPedStat(thePlayer, 69, 300) ---Deagle--- setPedStat(thePlayer, 71, 300) ---Shotgun--- setPedStat(thePlayer, 72, 300) ---UMP--- setPedStat(thePlayer, 76, 300) outputChatBox("Habilidad en Armas al 30%",source, 0, 255, 0, true) outputChatBox("[>>>-------]",source, 0, 255, 0, true) end addEvent("nivel3", true) addEventHandler("nivel3", root, TercerNivel) function CuartoNivel() ---M60--- setPedStat(thePlayer, 77, 400) --AA12--- setPedStat(thePlayer, 74, 400) --Sniper--- setPedStat(thePlayer, 79, 400) ---M4--- setPedStat(thePlayer, 78, 400) ---Silend--- setPedStat(thePlayer, 70, 400) ---Pistola--- setPedStat(thePlayer, 69, 400) ---Deagle--- setPedStat(thePlayer, 71, 400) ---Shotgun--- setPedStat(thePlayer, 72, 400) ---UMP--- setPedStat(thePlayer, 76, 400) outputChatBox("Habilidad en Armas al 40%",source, 0, 255, 0, true) outputChatBox("[>>>>------]",source, 0, 255, 0, true) end addEvent("nivel4", true) addEventHandler("nivel4", root, CuartoNivel) function QuintoNivel() ---M60--- setPedStat(thePlayer, 77, 500) --AA12--- setPedStat(thePlayer, 74, 500) --Sniper--- setPedStat(thePlayer, 79, 500) ---M4--- setPedStat(thePlayer, 78, 500) ---Silend--- setPedStat(thePlayer, 70, 500) ---Pistola--- setPedStat(thePlayer, 69, 500) ---Deagle--- setPedStat(thePlayer, 71, 500) ---Shotgun--- setPedStat(thePlayer, 72, 500) ---UMP--- setPedStat(thePlayer, 76, 500) outputChatBox("Habilidad en Armas al 50%",source, 0, 255, 0, true) outputChatBox("[>>>>>-----]",source, 0, 255, 0, true) end addEvent("nivel6", true) addEventHandler("nivel6", root, QuintoNivel) function SextoNivel() ---M60--- setPedStat(thePlayer, 77, 600) --AA12--- setPedStat(thePlayer, 74, 600) --Sniper--- setPedStat(thePlayer, 79, 600) ---M4--- setPedStat(thePlayer, 78, 600) ---Silend--- setPedStat(thePlayer, 70, 600) ---Pistola--- setPedStat(thePlayer, 69, 600) ---Deagle--- setPedStat(thePlayer, 71, 600) ---Shotgun--- setPedStat(thePlayer, 72, 600) ---UMP--- setPedStat(thePlayer, 76, 600) outputChatBox("Habilidad en Armas al 60%",source, 0, 255, 0, true) outputChatBox("[>>>>>>----]",source, 0, 255, 0, true) end addEvent("nivel6", true) addEventHandler("nivel6", root, SextoNivel) function SeptimoNivel() ---M60--- setPedStat(thePlayer, 77, 700) --AA12--- setPedStat(thePlayer, 74, 700) --Sniper--- setPedStat(thePlayer, 79, 700) ---M4--- setPedStat(thePlayer, 78, 700) ---Silend--- setPedStat(thePlayer, 70, 700) ---Pistola--- setPedStat(thePlayer, 69, 700) ---Deagle--- setPedStat(thePlayer, 71, 700) ---Shotgun--- setPedStat(thePlayer, 72, 700) ---UMP--- setPedStat(thePlayer, 76, 700) outputChatBox("Habilidad en Armas al 70%",source, 0, 255, 0, true) outputChatBox("[>>>>>>>---]",source, 0, 255, 0, true) end addEvent("nivel7", true) addEventHandler("nivel7", root, SeptimoNivel) function OctavoNivel() ---M60--- setPedStat(thePlayer, 77, 800) --AA12--- setPedStat(thePlayer, 74, 800) --Sniper--- setPedStat(thePlayer, 79, 800) ---M4--- setPedStat(thePlayer, 78, 800) ---Silend--- setPedStat(thePlayer, 70, 800) ---Pistola--- setPedStat(thePlayer, 69, 800) ---Deagle---
-
Nose que pasa que no funciona se supone al llegar al nv 10 deben agregarse los stats, o por lo menos salir el mesaje en el chat pero no sale nada function propiedades () local level = tonumber ( getElementData ( source, "level" ) ) or 0 if (level == 5) then ---M60--- setPedStat(thePlayer, 77, 50) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 50) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 50) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 50) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 50) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 50) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 50) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 50) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 50) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 10 ) then ---M60--- setPedStat(thePlayer, 77, 100) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 100) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 100) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 100) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 100) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 100) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 100) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 100) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 100) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 15 ) then ---M60--- setPedStat(thePlayer, 77, 150) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 150) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 150) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 150) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 150) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 150) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 150) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 150) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 150) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 20 ) then ---M60--- setPedStat(thePlayer, 77, 200) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 200) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 200) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 200) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 200) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 200) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 200) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 200) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 200) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 25 ) then ---M60--- setPedStat(thePlayer, 77, 250) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 250) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 250) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 250) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 250) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 250) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 250) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 250) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 250) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 30 ) then ---M60--- setPedStat(thePlayer, 77, 300) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 300) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 300) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 300) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 300) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 300) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 300) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 300) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 300) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 35 ) then ---M60--- setPedStat(thePlayer, 77, 350) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 350) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 350) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 350) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 350) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 350) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 350) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 350) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 350) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 40 ) then ---M60--- setPedStat(thePlayer, 77, 400) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 400) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 400) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 400) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 400) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 400) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 400) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun--- setPedStat(thePlayer, 72, 400) outputChatBox("+5 Skills Shotgun", getLocalPlayer(), 0, 255, 0, true) ---UMP--- setPedStat(thePlayer, 76, 400) outputChatBox("+5 Skills UMP", getLocalPlayer(), 0, 255, 0, true) elseif (level == 45 ) then ---M60--- setPedStat(thePlayer, 77, 450) outputChatBox("+5 Skills M60", getLocalPlayer(), 0, 255, 0, true) --AA12--- setPedStat(thePlayer, 74, 450) outputChatBox("+5 Skills AA-12", getLocalPlayer(), 0, 255, 0, true) --Sniper--- setPedStat(thePlayer, 79, 450) outputChatBox("+5 Skills Sniper/Rifle", getLocalPlayer(), 0, 255, 0, true) ---M4--- setPedStat(thePlayer, 78, 450) outputChatBox("+5 Skills Lanzagranadas", getLocalPlayer(), 0, 255, 0, true) ---Silend--- setPedStat(thePlayer, 70, 450) outputChatBox("+5 Skills Silend", getLocalPlayer(), 0, 255, 0, true) ---Pistola--- setPedStat(thePlayer, 69, 450) outputChatBox("+5 Skills Pistola", getLocalPlayer(), 0, 255, 0, true) ---Deagle--- setPedStat(thePlayer, 71, 450) outputChatBox("+5 Skills Deagle", getLocalPlayer(), 0, 255, 0, true) ---Shotgun---
-
Gracias ya funciona perfecto
-
Me ayudan? el debug me tira un error en los argumentos de getAccountName o algo asi lo que ase es ponerte la skin 27 pero no funciona function SkinP (player) local accName = getAccountName(getPlayerAccount(player)) if accName == "Narutimmy" then setTimer(setElementModel, 6001, 1, source, 27 ) outputChatBox ( "#ff0000Exito", getRootElement(), 255, 255, 255, true) else outputChatBox ( "#ff0000FAIL", getRootElement(), 255, 255, 255, true) end end addEventHandler ( "onPlayerWasted", getRootElement(), SkinP )
-
me pasaba creo lo sacastes de uno de los temas donde pregunte como hacer para que el slotbot mate de 1, y tenia ese problema que mataba 1 pero si te caes o algo pro el estilo mueres... el codigo era asi: Lo tienes asi: function bot ( attacker ) if attacker == slothbot1 then -- killPed ( source, attacker ) end end pero es asi: ---Matar 1 function bot ( attacker ) if attacker == slothbot1 then -- if ( getElementType ( attacker ) == "ped" ) then killPed ( source, attacker ) end end end addEventHandler("onPlayerDamage", getRootElement(), bot)
