depato123 Posted June 7, 2013 Share Posted June 7, 2013 --Mecánico function fixCar (player,command) skin = getPedSkin (player) if ( skin == 50 ) then local vehicle = getPedOccupiedVehicle(player) if (vehicle) then fixVehicle(vehicle) givePlayerMoney (player,250) takePlayerMoney (theDriver, 250) end end end addCommandHandler("repair" , fixCar) addCommandHandler("rp" , fixCar) Yo quiero que cuando el mecánico (skin 50) diga el comando /rp, dentro del auto roto, el auto se repare y al conductor le quite 250$ y también que le de 250$ al que dijo el comando /rp o /repair, intente hacer eso pero no funciono y al conductor no le quita los 250$ Link to comment
AlvareZ_ Posted June 7, 2013 Share Posted June 7, 2013 --Mecánico function fixCar (player,command) local conductor = isPedInVehicle() local skin = getPlayerSkin() local carro = getPedOccupiedVehicle ( thePlayer ) if (carro) then if ( skin == 50 ) then fixVehicle(vehicle) givePlayerMoney (thePlayer,250) takePlayerMoney (conductor, 250) end end end addCommandHandler("repair" , fixCar) addCommandHandler("rp" , fixCar) Link to comment
Renkon Posted June 7, 2013 Share Posted June 7, 2013 --Mecánico function fixCar (player,command) local conductor = isPedInVehicle() local skin = getPlayerSkin() local carro = getPedOccupiedVehicle ( thePlayer ) if (carro) then if ( skin == 50 ) then fixVehicle(vehicle) givePlayerMoney (thePlayer,250) takePlayerMoney (conductor, 250) end end end addCommandHandler("repair" , fixCar) addCommandHandler("rp" , fixCar) Te recibirás de persona que trabaja por otros haciendo las cosas mal. Sigue así. ON: theDriver no está definido. Debes definir theDriver. Link to comment
depato123 Posted June 7, 2013 Author Share Posted June 7, 2013 Te recibirás de persona que trabaja por otros haciendo las cosas mal. Sigue así. ON: theDriver no está definido. Debes definir theDriver. ¿como hago eso? intente fijarme en la wiki pero no encontré la función de theDriver Link to comment
Renkon Posted June 7, 2013 Share Posted June 7, 2013 No es una funcion, es la variable de el que está arriba del coche. Debes conseguirla y ahí sacarle el dinero. Link to comment
Recommended Posts