Arsilex Posted September 28, 2012 Share Posted September 28, 2012 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
Castillo Posted September 28, 2012 Share Posted September 28, 2012 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
Castillo Posted September 28, 2012 Share Posted September 28, 2012 Postea como ejecutas el evento: "Armas.Escopeta". Link to comment
Arsilex Posted September 28, 2012 Author Share Posted September 28, 2012 function Escopeta1() triggerServerEvent ( "Armas.Escopeta", getRootElement() ) showCursor ( false ) end Link to comment
Arsilex Posted September 28, 2012 Author Share Posted September 28, 2012 Ya lo eh solucionado gracias castillo Link to comment
Recommended Posts