PhantomDamn Posted May 1, 2013 Share Posted May 1, 2013 quiero que este script no funcione si el player no tiene money... actualmente cualquiera lo usa sin money.. function mamamia (player, command) local auto = getPedOccupiedVehicle(player) fixVehicle(auto) local prachy = getPlayerMoney(player) if prachy > 2000 then takePlayerMoney(player, 2000) outputChatBox("Your vehicle has been fixed - 2000$. You have $" .. getPlayerMoney(player), player, 0, 255, 0) else outputChatBox("You don't have a 2000$", player, 250, 0, 0 ) end end addCommandHandler("fix", mamamia) podria usar esto? setElementPosition Link to comment
FraN-724 Posted May 1, 2013 Share Posted May 1, 2013 Intena probando con el que uso yo function repair(source) if isPedInVehicle(source) then if ( getPlayerMoney (source) >= 5000 ) then takePlayerMoney(source, 5000) fixVehicle(getPedOccupiedVehicle(source)) outputChatBox("Has Comprado Repair por $5000.", source, 0, 255, 0, true) else outputChatBox("No tienes suficiente dinero para realizar esta acción.", source, 255, 0, 0, true) end else outputChatBox("No estas en un vehiculo.", source, 255, 0, 0, true) end end addCommandHandler('fixcar', repair) Link to comment
Sasu Posted May 1, 2013 Share Posted May 1, 2013 function mamamia (player, command) local prachy = getPlayerMoney(player) local auto = getPedOccupiedVehicle(player) if auto and prachy >= 2000 then fixVehicle(auto) takePlayerMoney(player, 2000) outputChatBox("Your vehicle has been fixed - 2000$. You have $" .. getPlayerMoney(player), player, 0, 255, 0) else outputChatBox("You don't have a 2000$", player, 250, 0, 0 ) end end addCommandHandler("fix", mamamia) Tenias el fixVehicle arriba del if por lo que reparaba el auto aun o no tengas la plata. Link to comment
PhantomDamn Posted May 1, 2013 Author Share Posted May 1, 2013 solo lo descargue asi.. gracias a los dos Link to comment
Recommended Posts