Jump to content

Ayuda pls


Arsilex

Recommended Posts

function Encender3() 
    if takePlayerMoney ( thePlayer, 500 ) then 
            giveWeapon ( source, 25, 100 ) 
    else 
        outputChatBox ( "No hay dinero no hay armas amigo" ) 
    end 
end 
addEvent( "Armas.Escopeta", true ) 
addEventHandler( "Armas.Escopeta", getRootElement(), Encender3 ) 

No se si esta bien o mal pero me como podria hacer si el player no tiene 500$ para que no le de el arma?

Link to comment
function Encender3 ( ) 
    if ( getPlayerMoney ( source ) >= 500 ) then 
        takePlayerMoney ( source, 500 ) 
        giveWeapon ( source, 25, 100 ) 
    else 
        outputChatBox ( "No hay dinero no hay armas amigo" ) 
    end 
end 
addEvent( "Armas.Escopeta", true ) 
addEventHandler( "Armas.Escopeta", getRootElement(), Encender3 ) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...