Jump to content

Ayuda


JesusAliso

Recommended Posts

Posted

Hola Me pueden decir que Comando son para que un Jugador entre en un "Área" y le de dinero cada segundo.el "Área" puede ser

createColCuboid 

Cuales Serian los que faltan?

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Hice esto, Cuando entra al "Área" Le da 100$, Como haría para que le Diera 1000$ cada segundo?

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 ) 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) 
                setRadarAreaFlashing ( hillRadar, true ) 
        end 
end 
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 

Tambien Cuando entro y salgo del are, Me da 1000$ :(

  • MTA Team
Posted
  
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 ) 
        if (getElementType(thePlayer) == "player") then 
                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 ) 

Asi seria mas o menos..Prueba asi

  • MTA Team
Posted

Recuerda que eso va hacer que se repita la funcion cada cierto cantidad de tiempo..Por lo tanto el outputChatBox te va a spamear el server..Mete lo de "Entro a Zona de ganar dinero en otra funcion.!

  • MTA Team
Posted

lol men xq lo tienes Client-Side Cuando ese script es Server-Side Cambaialo en el Meta a Server-Side

Posted

Real mente, e visto que hablan mucho de eso y te digo que no se que significa e hechos post para saber sobre eso. Pero esta es la meta

    "Under" name="radar"  version="1.0.3" type="script"/> 
    

  • MTA Team
Posted

Y si no quieres que te de dinero cuando sales usas "onColShapeLeave"

Asi seria:

  
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 ) 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) 
                setRadarAreaFlashing ( hillRadar, true ) 
        end 
end 
function hill_Leave ( thePlayer, matchingDimention )  
givePlayerMoney ( thePlayer, 0 ) 
end 
  
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 
addEventHandler ( "onColShapeHit", hillArea, hill_Leave ) 
setTimer ( hill_Enter 1000, 1 ) 

  • MTA Team
Posted

Probas asi, me comi una Coma

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 ) 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) 
                setRadarAreaFlashing ( hillRadar, true ) 
        end 
end 
function hill_Leave ( thePlayer, matchingDimention )  
givePlayerMoney ( thePlayer, 0 ) 
end 
  
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 
addEventHandler ( "onColShapeHit", hillArea, hill_Leave ) 
setTimer ( hill_Enter, 1000, 1 ) 

Posted

Creo que es ..

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 ) 
        if (getElementType(thePlayer) == "player") then 
                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
Posted

Lool me equivoque denuevo..xD seria asi:

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 ) 
        if (getElementType(thePlayer) == "player") then 
                outputChatBox( getPlayerName(thePlayer) .. " Entro a zona de ganar Dinero!", getRootElement(), 255, 255, 109 ) 
                setRadarAreaFlashing ( hillRadar, true ) 
        end 
end 
function hill_Leave ( thePlayer, matchingDimention )  
givePlayerMoney ( thePlayer, 0 ) 
end 
  
addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) 
addEventHandler ( "onColShapeLeave", hillArea, hill_Leave ) 
setTimer ( hill_Enter, 1000, 1 ) 

Posted

Me dice este error, newprueba/client.lua:5: Bad argument @ 'givePlayerMoney'

el otro dice: newprueba/client.lua:6: Bad argument @ 'getElementType' [Expected element at argument 1, got nill]

Posted (edited)

Intenta esto:

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 ) 

Edited by Guest
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...