Jump to content

Una de mis ultimas preguntas


Plate

Recommended Posts

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

Link to comment
  
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

Link to comment
  
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".

Link to comment
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) 

Link to comment

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) 
  

Link to comment

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) 

Link to comment
  • Recently Browsing   0 members

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