hmm what about if ( money >= 200) then ?
function whatever ( button, player, state )
local vehicle = getPlayerOccupiedVehicle( player ) -- or getPedOccupiedVehicle if its for nightly...
if vehicle then
local money = getPlayerMoney ( player )
if ( money >= 200) then
fixVehicle( vehicle )
takePlayerMoney( player, 200 )
else
outputChatBox( "You need 200$ to repair your car", player, 255, 0, 0 )
end
else
outputChatBox(" you need a vehicle for this ", player, 255, 0, 0 )
end
end
and the other question.. i dont know how to do it :b but what about spawn player where he died ?