Plate Posted May 22, 2012 Share Posted May 22, 2012 Porfavor se los ruego ayudenmen a Bloquear los autos y armas por levels Link to comment
Alexs Posted May 22, 2012 Share Posted May 22, 2012 depende del level system, pero usa onVehicleStartEnter --Para Autos onPlayerWeaponSwitch --Para armas Link to comment
Plate Posted May 22, 2012 Author Share Posted May 22, 2012 alex yo uso exp_system solid me avia dicho que era algo haci creo...... solid es un grosos 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
Alexs Posted May 22, 2012 Share Posted May 22, 2012 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 Link to comment
Edikosh998 Posted May 22, 2012 Share Posted May 22, 2012 Alex , 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. Link to comment
Castillo Posted May 23, 2012 Share Posted May 23, 2012 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 Tu variable se llama "levelexp" pero vos estas usando "level". Link to comment
Alexs Posted May 23, 2012 Share Posted May 23, 2012 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
Plate Posted May 23, 2012 Author Share Posted May 23, 2012 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
Castillo Posted May 23, 2012 Share Posted May 23, 2012 Usa triggerClientEvent en el lado del server side y en el client side creas el evento. Link to comment
Plate Posted May 24, 2012 Author Share Posted May 24, 2012 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
Castillo Posted May 24, 2012 Share Posted May 24, 2012 No tiene el menor sentido, sin ofender. Link to comment
Plate Posted May 24, 2012 Author Share Posted May 24, 2012 No ofende al contrario gracias tratare de hacerlo bien pero no comprendo el evento no entiendo como hacerlo u.u Link to comment
Edikosh998 Posted May 24, 2012 Share Posted May 24, 2012 https://wiki.multitheftauto.com/wiki/Scr ... troduction https://wiki.multitheftauto.com/wiki/Int ... ng_the_GUI http://www.learnenglish.de/ Sinceramente, basta... Link to comment
Recommended Posts