Jump to content

Una de mis ultimas preguntas


Plate

Recommended Posts

Posted

alex yo uso exp_system solid me avia dicho que era algo haci

creo...... solid es un grosos xD

local elNivel = exports [ "exp_system" ]:getPlayerLevel ( elJugador ) 

si lo agregas quedaria algo haci mira

addEvent ("comproDeagle", true) 
addEventHandler ("comproDeagle", getRootElement(),  
function (id, cost,munic) 
local Test1 = exports [ "exp_system" ]:getPlayerLevel ( elJugador ) 
  if (getPlayerMoney (source) >= tonumber(cost)) then 
    outputChatBox ("Has comprado una Colt-45", source, 0, 255, 0, false) 
    takePlayerMoney (source, tonumber (cost)) 
    giveWeapon(source, tonumber (id),tonumber (munic)) 
  else 
    outputChatBox ("Necesitas dinero", source, 255, 0, 0, false) 
  end 
end) 

era un ejemplo nose si me podrias ayudar a que funcione por que dice badargument getThePlayerLevel

Posted
  
addEvent ("comproDeagle", true) 
addEventHandler ("comproDeagle", getRootElement(),  
function (id, cost,munic) 
         local levelexp = exports.exp_system:getPlayerLevel ( source ) 
  if (getPlayerMoney (source) >= tonumber(cost)) and level >= 10 then 
    outputChatBox ("Has comprado una Colt-45", source, 0, 255, 0, false) 
    takePlayerMoney (source, tonumber (cost)) 
    giveWeapon(source, tonumber (id),tonumber (munic)) 
  else 
    outputChatBox ("Necesitas dinero", source, 255, 0, 0, false) 
  end 
end) 

te faltaba agregar que el level debia ser >=10 lo q no recuerdo es si > es mayor o menor xD

Posted

Alex :o , eso es un concepto matematico

Siempre la flecha que señale al otro item, determina que ese item que señala es menor al que esta detras suyo. Por ende, el ">" determina que el primer item es mayor que el segundo.

Posted
  
addEvent ("comproDeagle", true) 
addEventHandler ("comproDeagle", getRootElement(),  
function (id, cost,munic) 
         local levelexp = exports.exp_system:getPlayerLevel ( source ) 
  if (getPlayerMoney (source) >= tonumber(cost)) and level >= 10 then 
    outputChatBox ("Has comprado una Colt-45", source, 0, 255, 0, false) 
    takePlayerMoney (source, tonumber (cost)) 
    giveWeapon(source, tonumber (id),tonumber (munic)) 
  else 
    outputChatBox ("Necesitas dinero", source, 255, 0, 0, false) 
  end 
end) 

te faltaba agregar que el level debia ser >=10 lo q no recuerdo es si > es mayor o menor xD

Tu variable se llama "levelexp" pero vos estas usando "level".

Posted
addEvent ("comproDeagle", true) 
addEventHandler ("comproDeagle", getRootElement(),  
function (id, cost,munic) 
         local levelexp = exports.exp_system:getPlayerLevel ( source ) 
  if (getPlayerMoney (source) >= tonumber(cost)) and levelexp >= 10 then 
    outputChatBox ("Has comprado una Colt-45", source, 0, 255, 0, false) 
    takePlayerMoney (source, tonumber (cost)) 
    giveWeapon(source, tonumber (id),tonumber (munic)) 
  else 
    outputChatBox ("Necesitas dinero", source, 255, 0, 0, false) 
  end 
end) 

Posted

tengo un problema con el sonido de la tienda de armas tambien u.u es que me descargue sonidos de resident evil y no funcionan bien te dice thank you y no cash aunque no la compres el arma o la compres

function darDeagle() 
    local itemID = 22 
    local itemCost = 0 
    local itemMunic = 100 
            playSound ( "sounds/shop/thx.mp3", false ) 
    triggerServerEvent ("comproDeagle", getLocalPlayer(), itemID, itemCost,itemMunic) 
end 
addEventHandler ("onClientGUIClick", botonComprarDeagle, darDeagle, false) 
  

Posted

bardeenmen si esta mal pero esto esta bien ??

addEvent ("comproShotgun", true) 
addEventHandler ("comproShotgun", getRootElement(),  
function (id, cost,munic) 
         local levelexp = exports.exp_system:getPlayerLevel ( source ) 
  if (getPlayerMoney (source) >= tonumber(cost)) and levelexp >= 10 then 
    outputChatBox ("Has comprado Shotgun", source, 0, 255, 0, false) 
    takePlayerMoney (source, tonumber (cost)) 
    giveWeapon(source, tonumber (id),tonumber (munic)) 
  else 
 triggerClientEvent ( "darShotgun", getRootElement(), "playSound ( sounds/shop/thx.mp3, false )" ) 
    outputChatBox ("Necesitas dinero", source, 255, 0, 0, false) 
  end 
end) 

Posted

No ofende al contrario gracias tratare de hacerlo bien pero no comprendo el evento

no entiendo como hacerlo u.u

  • Recently Browsing   0 members

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