Testado, só precisa usa as funções para tirar o dinheiro do dono do veiculo e mandar para o "Mecânico"
para isso use
givePlayerMoney
e
takePlayerMoney
Roteiro testado:
local myBlip = createBlip( 1611.8278808594,-2153.7219238281,0, 51, 0, 0, 0, 255, myPlayer )
theMarker = createMarker ( 1611.8278808594,-2153.7219238281,13.5546875 -0.9, "cylinder", 1.5, 255, 255, 0, 170 )
function fix (playerSource, thePlayer)
if isElementWithinMarker(playerSource, theMarker) then
local team = getPlayerTeam(playerSource)
if team and getTeamName(team) == "Mecanico" then
local theVehicle = getPedOccupiedVehicle (playerSource)
setElementFrozen(theVehicle, true)
setTimer(setElementFrozen, 10000, 1, theVehicle, false)
if theVehicle and getVehicleController ( theVehicle ) == playerSource then
setTimer( fixVehicle, 10000, 1, theVehicle ) -- função do FuSioN_
outputChatBox ("Você consertou o veículo, converse com o dono e pegue sua recompença!", thePlayer, 255, 0, 0, true )
end
end
end
end
addCommandHandler("fix",fix)