Still doesn't work. Same error as on first message. Also i got error on way different script -
function fixVehicle ( theVehicle )
playerAccount = getPlayerAccount ( source )
playerCash = getAccountData ( playerAccount, "Cash" ) or "0"
playerAllowed = getElementData ( source, "data.repairBuyAllowed" ) or "true"
playerVehicle = getPedOccupiedVehicle ( player )
if ( playerVehicle ~= nil ) then
if ( tonumber ( playerCash ) >= 1000 ) then
if ( playerAllowed ) = "true" then
fixVehicle ( playerVehicle )
setElementData ( source, "data.repairBuyAllowed", "false" )
else
outputChatBox ( "You may buy only one vehicle repair per map.", source, 255, 0, 0, true )
else
outputChatBox ( "You need to have at least 1000$ to fix your vehicle", source, 255, 0, 0, true)
else
outputChatBox ( "You need to be in a vehicle to buy a repair", source, 255, 0, 0, true )
end
end
end
end
addCommandHandler ( "buyrepair", fixVehicle )
addCommandHandler ( "br", fixVehicle )
Error on line 8 - 'then' expected near '='. Couldn't think out anything